me like nix
0

Configure Feed

Select the types of activity you want to include in your feed.

1{ inputs, ... }: 2 3{ 4 flake.modules.nixos.desktop = 5 { pkgs, lib, ... }: 6 { 7 programs.niri.enable = true; 8 9 catppuccin = { 10 enable = true; 11 autoEnable = true; 12 flavor = "frappe"; 13 }; 14 15 programs.regreet = { 16 enable = true; 17 cageArgs = [ 18 "-s" 19 "-d" 20 ]; 21 settings.GTK.application_prefer_dark_theme = true; 22 theme = { 23 package = pkgs.catppuccin-gtk.override { 24 variant = "frappe"; 25 accents = [ "lavender" ]; 26 size = "standard"; 27 }; 28 name = "catppuccin-frappe-lavender-standard"; 29 }; 30 iconTheme = { 31 package = pkgs.catppuccin-papirus-folders.override { 32 flavor = "frappe"; 33 accent = "lavender"; 34 }; 35 name = "Papirus-Dark"; 36 }; 37 cursorTheme = { 38 package = pkgs.catppuccin-cursors.frappeDark; 39 name = "catppuccin-frappe-dark-cursors"; 40 }; 41 }; 42 43 # Scale regreet's greeter for HiDPI displays 44 services.greetd.settings.default_session.command = lib.mkForce 45 "${pkgs.dbus}/bin/dbus-run-session ${lib.getExe pkgs.cage} -s -d -- env GDK_SCALE=2 ${lib.getExe pkgs.regreet}"; 46 47 # ZSA Keyboard udev rules for Oryx web flashing and live training 48 services.udev.extraRules = '' 49 # Rules for Oryx web flashing and live training 50 KERNEL=="hidraw*", ATTRS{idVendor}=="16c0", MODE="0664", GROUP="plugdev" 51 KERNEL=="hidraw*", ATTRS{idVendor}=="3297", MODE="0664", GROUP="plugdev" 52 53 # Legacy rules for live training over webusb (Not needed for firmware v21+) 54 # Rule for all ZSA keyboards 55 SUBSYSTEM=="usb", ATTR{idVendor}=="3297", GROUP="plugdev" 56 # Rule for the Moonlander 57 SUBSYSTEM=="usb", ATTR{idVendor}=="3297", ATTR{idProduct}=="1969", GROUP="plugdev" 58 # Rule for the Ergodox EZ 59 SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="1307", GROUP="plugdev" 60 # Rule for the Planck EZ 61 SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="6060", GROUP="plugdev" 62 63 # Wally Flashing rules for the Ergodox EZ 64 ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1" 65 ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1" 66 SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", MODE:="0666" 67 KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", MODE:="0666" 68 69 # Keymapp / Wally Flashing rules for the Moonlander and Planck EZ 70 SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666", SYMLINK+="stm32_dfu" 71 # Keymapp Flashing rules for the Voyager 72 SUBSYSTEMS=="usb", ATTRS{idVendor}=="3297", MODE:="0666", SYMLINK+="ignition_dfu" 73 # USB serial device access via Chrome/Chromium 74 KERNEL=="ttyUSB[0-9]*", MODE:="0666", GROUP="dialout" 75 KERNEL=="ttyACM[0-9]*", MODE:="0666", GROUP="dialout" 76 ''; 77 }; 78 79 flake.modules.homeManager.desktop = 80 { pkgs, config, ... }: 81 let 82 kaleiduxBase = inputs.kaleidux.packages.${pkgs.stdenv.hostPlatform.system}.default; 83 dav1dOverride = old: { 84 buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.dav1d ]; 85 }; 86 kaleiduxDeps = (builtins.head kaleiduxBase.builtDependencies).overrideAttrs dav1dOverride; 87 kaleidux = kaleiduxBase.overrideAttrs (old: (dav1dOverride old) // { 88 builtDependencies = [ kaleiduxDeps ]; 89 }); 90 wallpapers = import ./_data/wallpapers.nix; 91 downloads = builtins.concatStringsSep "\n" ( 92 map (wp: '' 93 if [ ! -f "$DIR/${wp.filename}" ]; then 94 echo "Downloading ${wp.filename}..." 95 ${pkgs.curl}/bin/curl -fsSL -o "$DIR/${wp.filename}" ${ 96 builtins.replaceStrings [ "\"" ] [ "\\\"" ] wp.url 97 } || echo "WARNING: Failed to download ${wp.filename}, skipping" 98 fi 99 '') wallpapers 100 ); 101 in 102 { 103 home.packages = with pkgs; [ 104 inputs.fsel.packages.${pkgs.stdenv.hostPlatform.system}.default 105 inputs.mako-tui.packages.${pkgs.stdenv.hostPlatform.system}.default 106 bemoji 107 networkmanager_dmenu 108 kaleidux 109 (import ../packages/cclip.nix { inherit pkgs; }) 110 pavucontrol 111 playerctl 112 xwayland-satellite 113 ]; 114 115 programs.niri = { 116 enable = true; 117 settings = { 118 window-rules = [ 119 { 120 geometry-corner-radius = { 121 top-left = 5.0; 122 top-right = 5.0; 123 bottom-left = 5.0; 124 bottom-right = 5.0; 125 }; 126 clip-to-geometry = true; 127 draw-border-with-background = false; 128 } 129 { 130 matches = [ { app-id = "^steam_app_"; } ]; 131 border.enable = false; 132 open-fullscreen = true; 133 } 134 { 135 matches = [ { app-id = "^fsel$"; } ]; 136 open-floating = true; 137 default-column-width.fixed = 800; 138 default-window-height.fixed = 500; 139 } 140 { 141 matches = [ { app-id = "^mako-tui$"; } ]; 142 open-floating = true; 143 default-column-width.fixed = 800; 144 default-window-height.fixed = 500; 145 } 146 ]; 147 debug = { 148 honor-xdg-activation-with-invalid-serial = { }; 149 }; 150 layout = { 151 focus-ring = { 152 width = 2; 153 active.color = "#8caaee"; 154 inactive.color = "#414559"; 155 }; 156 struts = { 157 top = -6; 158 bottom = -6; 159 left = 0; 160 right = 0; 161 }; 162 gaps = 8; 163 }; 164 gestures = { 165 hot-corners = { 166 enable = false; 167 }; 168 }; 169 binds = { 170 "Mod+d".action.spawn = [ 171 "alacritty" 172 "--class" 173 "fsel" 174 "-e" 175 "fsel" 176 "--detach" 177 ]; 178 "Mod+c".action.spawn = [ 179 "alacritty" 180 "--class" 181 "fsel" 182 "-e" 183 "fsel" 184 "--cclip" 185 ]; 186 "Mod+e".action.spawn = "bemoji"; 187 "Mod+n".action.spawn = [ 188 "alacritty" 189 "--class" 190 "mako-tui" 191 "-e" 192 "mako-tui" 193 ]; 194 "Mod+a".action.spawn = "alacritty"; 195 "Mod+h".action = { 196 focus-column-left = { }; 197 }; 198 "Mod+j".action = { 199 focus-workspace-down = { }; 200 }; 201 "Mod+k".action = { 202 focus-workspace-up = { }; 203 }; 204 "Mod+l".action = { 205 focus-column-right = { }; 206 }; 207 "Mod+Shift+h".action = { 208 move-column-left = { }; 209 }; 210 "Mod+Shift+j".action = { 211 move-window-down-or-to-workspace-down = { }; 212 }; 213 "Mod+Shift+k".action = { 214 move-window-up-or-to-workspace-up = { }; 215 }; 216 "Mod+Shift+l".action = { 217 move-column-right = { }; 218 }; 219 "Mod+Down".action = { 220 move-workspace-down = { }; 221 }; 222 "Mod+Up".action = { 223 move-workspace-up = { }; 224 }; 225 "Mod+p".action = { 226 show-hotkey-overlay = { }; 227 }; 228 "Mod+o".action = { 229 toggle-overview = { }; 230 }; 231 "Mod+q".action = { 232 close-window = { }; 233 }; 234 "Mod+f".action = { 235 toggle-window-floating = { }; 236 }; 237 "Mod+Shift+f".action = { 238 switch-focus-between-floating-and-tiling = { }; 239 }; 240 "Mod+m".action = { 241 fullscreen-window = { }; 242 }; 243 "Mod+s".action = { 244 screenshot = { 245 show-pointer = true; 246 }; 247 }; 248 "Mod+1".action = { 249 set-column-width = "100%"; 250 }; 251 "Mod+2".action = { 252 set-column-width = "50%"; 253 }; 254 "Mod+Minus".action = { 255 set-column-width = "-10%"; 256 }; 257 "Mod+Equal".action = { 258 set-column-width = "+10%"; 259 }; 260 "Mod+Shift+q".action = { 261 quit = { }; 262 }; 263 "Mod+Shift+r".action.spawn = [ 264 "systemctl" 265 "--user" 266 "restart" 267 "noctalia.service" 268 ]; 269 "XF86AudioPlay".action.spawn = [ 270 "playerctl" 271 "play-pause" 272 ]; 273 "XF86AudioStop".action.spawn = [ 274 "playerctl" 275 "stop" 276 ]; 277 "XF86AudioNext".action.spawn = [ 278 "playerctl" 279 "next" 280 ]; 281 "XF86AudioPrev".action.spawn = [ 282 "playerctl" 283 "previous" 284 ]; 285 "XF86MonBrightnessDown".action.spawn = [ 286 "brightnessctl" 287 "set" 288 "5%-" 289 ]; 290 "XF86MonBrightnessUp".action.spawn = [ 291 "brightnessctl" 292 "set" 293 "+5%" 294 ]; 295 }; 296 outputs = { 297 "DP-5" = { 298 scale = 2.0; 299 mode = { 300 width = 5120; 301 height = 2160; 302 refresh = 120.0; 303 }; 304 position = { 305 x = 0; 306 y = 0; 307 }; 308 }; 309 "DP-1" = { 310 scale = 2.0; 311 mode = { 312 width = 5120; 313 height = 2160; 314 refresh = 120.0; 315 }; 316 position = { 317 x = 0; 318 y = 0; 319 }; 320 }; 321 "DP-2" = { 322 scale = 1.0; 323 mode = { 324 width = 5120; 325 height = 2160; 326 refresh = 120.0; 327 }; 328 position = { 329 x = 0; 330 y = 0; 331 }; 332 }; 333 "DP-6" = { 334 scale = 2.0; 335 mode = { 336 width = 5120; 337 height = 2160; 338 refresh = 120.0; 339 }; 340 position = { 341 x = 0; 342 y = 0; 343 }; 344 }; 345 "DP-7" = { 346 scale = 2.0; 347 mode = { 348 width = 5120; 349 height = 2160; 350 refresh = 120.0; 351 }; 352 position = { 353 x = 0; 354 y = 0; 355 }; 356 }; 357 "eDP-1" = { 358 scale = 1.5; 359 mode = { 360 width = 2560; 361 height = 1600; 362 refresh = 165.0; 363 }; 364 position = { 365 x = 0; 366 y = 1080; 367 }; 368 }; 369 }; 370 spawn-at-startup = [ 371 { command = [ "xwayland-satellite" ]; } 372 { command = [ "cclipd" ]; } 373 ]; 374 environment = { 375 DISPLAY = ":0"; 376 }; 377 }; 378 }; 379 380 catppuccin = { 381 enable = true; 382 autoEnable = true; 383 flavor = "frappe"; 384 }; 385 386 programs.noctalia = { 387 enable = true; 388 systemd.enable = true; 389 settings = { 390 shell = { 391 launch_apps_as_systemd_services = true; 392 }; 393 theme = { 394 mode = "dark"; 395 source = "builtin"; 396 builtin = "Catppuccin"; 397 }; 398 wallpaper = { 399 enabled = false; 400 }; 401 }; 402 }; 403 404 # Wallpaper downloads 405 home.activation.downloadWallpapers = 406 config.lib.dag.entryAfter [ "writeBoundary" ] '' 407 DIR="${config.home.homeDirectory}/Pictures/Wallpapers" 408 mkdir -p "$DIR" 409 ${downloads} 410 ''; 411 412 # Kaleidux wallpaper daemon config 413 xdg.configFile."kaleidux/config.toml".text = '' 414 [global] 415 monitor-behavior = "independent" 416 video-ratio = 50 417 sorting = "loveit" 418 transition-time = 1000 419 420 [any] 421 path = "${config.home.homeDirectory}/Pictures/Wallpapers" 422 duration = "15m" 423 transition = { type = "fade" } 424 ''; 425 426 systemd.user.services.kaleidux = { 427 Unit = { 428 Description = "Kaleidux dynamic wallpaper daemon"; 429 After = [ "graphical-session.target" ]; 430 PartOf = [ "graphical-session.target" ]; 431 }; 432 Service = { 433 ExecStart = "${kaleidux}/bin/kaleidux-daemon"; 434 Restart = "on-failure"; 435 RestartSec = 2; 436 }; 437 Install = { 438 WantedBy = [ "graphical-session.target" ]; 439 }; 440 }; 441 442 services.udiskie = { 443 enable = true; 444 tray = "never"; 445 automount = true; 446 }; 447 448 services.mako = { 449 enable = true; 450 settings = { 451 border-radius = 8; 452 border-size = 2; 453 padding = "12"; 454 margin = "12"; 455 font = "BerkeleyMono Nerd Font 11"; 456 on-button-left = "invoke-default-action"; 457 on-button-right = "dismiss"; 458 }; 459 }; 460 461 dconf.settings = { 462 "org/gnome/desktop/interface" = { 463 color-scheme = "prefer-dark"; 464 enable-hot-corners = false; 465 }; 466 }; 467 468 home.pointerCursor = { 469 name = "Adwaita"; 470 package = pkgs.adwaita-icon-theme; 471 size = 16; 472 x11.enable = true; 473 gtk.enable = true; 474 }; 475 }; 476}