Flake for my NixOS devices

Refactor to use flakelight

bwc9876.dev 719600ab dd8ee798

verified
+347 -1371
base/boot.nix nixosModules/base/boot.nix
base/nix.nix nixosModules/base/nix.nix
+1 -1
base/nushell.nix nixosModules/base/nushell.nix
··· 74 74 75 75 source ${init-starship} 76 76 77 - plugin add ${inputs.nu_plugin_dbus.packages.${pkgs.stdenv.hostPlatform.system}.default}/bin/nu_plugin_dbus 77 + plugin add ${pkgs.nu_plugin_dbus}/bin/nu_plugin_dbus 78 78 79 79 ''; 80 80 };
+6 -4
base/personal.nix nixosModules/base/personal.nix
··· 1 1 { 2 - pkgs, 3 2 edition, 4 3 inputs, 4 + config, 5 5 ... 6 6 }: { 7 + imports = [inputs.hm.nixosModules.default]; 8 + 7 9 time.timeZone = "America/New_York"; 8 10 9 11 users.users.bean = { ··· 18 20 home = { 19 21 username = "root"; 20 22 homeDirectory = "/root"; 21 - stateVersion = edition; 23 + stateVersion = config.system.stateVersion; 22 24 }; 23 25 }; 24 26 ··· 27 29 home = { 28 30 username = "bean"; 29 31 homeDirectory = "/home/bean"; 30 - file.".face".source = ../res/pictures/cow.png; 31 - stateVersion = edition; 32 + file.".face".source = "${inputs.self}/res/pictures/cow.png"; 33 + stateVersion = config.system.stateVersion; 32 34 }; 33 35 }; 34 36 }
+2
base/shell.nix nixosModules/base/shell.nix
··· 3 3 inputs, 4 4 ... 5 5 }: { 6 + imports = [inputs.nix-index-db.nixosModules.nix-index]; 7 + 6 8 users.users.bean.shell = pkgs.nushell; 7 9 users.users.root.shell = pkgs.nushell; 8 10 programs.fish.enable = true;
base/starship.nix nixosModules/base/starship.nix
base/theming.nix nixosModules/base/theming.nix
-2
create-sys/.gitignore
··· 1 - target 2 - result
-729
create-sys/Cargo.lock
··· 1 - # This file is automatically @generated by Cargo. 2 - # It is not intended for manual editing. 3 - version = 4 4 - 5 - [[package]] 6 - name = "aho-corasick" 7 - version = "1.1.3" 8 - source = "registry+https://github.com/rust-lang/crates.io-index" 9 - checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 10 - dependencies = [ 11 - "memchr", 12 - ] 13 - 14 - [[package]] 15 - name = "anstream" 16 - version = "0.6.18" 17 - source = "registry+https://github.com/rust-lang/crates.io-index" 18 - checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" 19 - dependencies = [ 20 - "anstyle", 21 - "anstyle-parse", 22 - "anstyle-query", 23 - "anstyle-wincon", 24 - "colorchoice", 25 - "is_terminal_polyfill", 26 - "utf8parse", 27 - ] 28 - 29 - [[package]] 30 - name = "anstyle" 31 - version = "1.0.10" 32 - source = "registry+https://github.com/rust-lang/crates.io-index" 33 - checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" 34 - 35 - [[package]] 36 - name = "anstyle-parse" 37 - version = "0.2.6" 38 - source = "registry+https://github.com/rust-lang/crates.io-index" 39 - checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" 40 - dependencies = [ 41 - "utf8parse", 42 - ] 43 - 44 - [[package]] 45 - name = "anstyle-query" 46 - version = "1.1.2" 47 - source = "registry+https://github.com/rust-lang/crates.io-index" 48 - checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" 49 - dependencies = [ 50 - "windows-sys 0.59.0", 51 - ] 52 - 53 - [[package]] 54 - name = "anstyle-wincon" 55 - version = "3.0.6" 56 - source = "registry+https://github.com/rust-lang/crates.io-index" 57 - checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" 58 - dependencies = [ 59 - "anstyle", 60 - "windows-sys 0.59.0", 61 - ] 62 - 63 - [[package]] 64 - name = "anyhow" 65 - version = "1.0.93" 66 - source = "registry+https://github.com/rust-lang/crates.io-index" 67 - checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" 68 - 69 - [[package]] 70 - name = "autocfg" 71 - version = "1.4.0" 72 - source = "registry+https://github.com/rust-lang/crates.io-index" 73 - checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" 74 - 75 - [[package]] 76 - name = "bitflags" 77 - version = "1.3.2" 78 - source = "registry+https://github.com/rust-lang/crates.io-index" 79 - checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 80 - 81 - [[package]] 82 - name = "bitflags" 83 - version = "2.6.0" 84 - source = "registry+https://github.com/rust-lang/crates.io-index" 85 - checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" 86 - 87 - [[package]] 88 - name = "byteorder" 89 - version = "1.5.0" 90 - source = "registry+https://github.com/rust-lang/crates.io-index" 91 - checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 92 - 93 - [[package]] 94 - name = "cfg-if" 95 - version = "1.0.0" 96 - source = "registry+https://github.com/rust-lang/crates.io-index" 97 - checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 98 - 99 - [[package]] 100 - name = "clap" 101 - version = "4.5.21" 102 - source = "registry+https://github.com/rust-lang/crates.io-index" 103 - checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" 104 - dependencies = [ 105 - "clap_builder", 106 - "clap_derive", 107 - ] 108 - 109 - [[package]] 110 - name = "clap_builder" 111 - version = "4.5.21" 112 - source = "registry+https://github.com/rust-lang/crates.io-index" 113 - checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" 114 - dependencies = [ 115 - "anstream", 116 - "anstyle", 117 - "clap_lex", 118 - "strsim", 119 - ] 120 - 121 - [[package]] 122 - name = "clap_derive" 123 - version = "4.5.18" 124 - source = "registry+https://github.com/rust-lang/crates.io-index" 125 - checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" 126 - dependencies = [ 127 - "heck", 128 - "proc-macro2", 129 - "quote", 130 - "syn", 131 - ] 132 - 133 - [[package]] 134 - name = "clap_lex" 135 - version = "0.7.3" 136 - source = "registry+https://github.com/rust-lang/crates.io-index" 137 - checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" 138 - 139 - [[package]] 140 - name = "colorchoice" 141 - version = "1.0.3" 142 - source = "registry+https://github.com/rust-lang/crates.io-index" 143 - checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" 144 - 145 - [[package]] 146 - name = "create-sys" 147 - version = "0.1.0" 148 - dependencies = [ 149 - "anyhow", 150 - "clap", 151 - "inquire", 152 - "regex", 153 - "serde", 154 - "serde_json", 155 - ] 156 - 157 - [[package]] 158 - name = "crossterm" 159 - version = "0.25.0" 160 - source = "registry+https://github.com/rust-lang/crates.io-index" 161 - checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" 162 - dependencies = [ 163 - "bitflags 1.3.2", 164 - "crossterm_winapi", 165 - "libc", 166 - "mio", 167 - "parking_lot", 168 - "signal-hook", 169 - "signal-hook-mio", 170 - "winapi", 171 - ] 172 - 173 - [[package]] 174 - name = "crossterm_winapi" 175 - version = "0.9.1" 176 - source = "registry+https://github.com/rust-lang/crates.io-index" 177 - checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" 178 - dependencies = [ 179 - "winapi", 180 - ] 181 - 182 - [[package]] 183 - name = "dyn-clone" 184 - version = "1.0.17" 185 - source = "registry+https://github.com/rust-lang/crates.io-index" 186 - checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" 187 - 188 - [[package]] 189 - name = "errno" 190 - version = "0.3.9" 191 - source = "registry+https://github.com/rust-lang/crates.io-index" 192 - checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" 193 - dependencies = [ 194 - "libc", 195 - "windows-sys 0.52.0", 196 - ] 197 - 198 - [[package]] 199 - name = "fastrand" 200 - version = "2.2.0" 201 - source = "registry+https://github.com/rust-lang/crates.io-index" 202 - checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" 203 - 204 - [[package]] 205 - name = "fuzzy-matcher" 206 - version = "0.3.7" 207 - source = "registry+https://github.com/rust-lang/crates.io-index" 208 - checksum = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94" 209 - dependencies = [ 210 - "thread_local", 211 - ] 212 - 213 - [[package]] 214 - name = "fxhash" 215 - version = "0.2.1" 216 - source = "registry+https://github.com/rust-lang/crates.io-index" 217 - checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" 218 - dependencies = [ 219 - "byteorder", 220 - ] 221 - 222 - [[package]] 223 - name = "heck" 224 - version = "0.5.0" 225 - source = "registry+https://github.com/rust-lang/crates.io-index" 226 - checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 227 - 228 - [[package]] 229 - name = "inquire" 230 - version = "0.7.5" 231 - source = "registry+https://github.com/rust-lang/crates.io-index" 232 - checksum = "0fddf93031af70e75410a2511ec04d49e758ed2f26dad3404a934e0fb45cc12a" 233 - dependencies = [ 234 - "bitflags 2.6.0", 235 - "crossterm", 236 - "dyn-clone", 237 - "fuzzy-matcher", 238 - "fxhash", 239 - "newline-converter", 240 - "once_cell", 241 - "tempfile", 242 - "unicode-segmentation", 243 - "unicode-width", 244 - ] 245 - 246 - [[package]] 247 - name = "is_terminal_polyfill" 248 - version = "1.70.1" 249 - source = "registry+https://github.com/rust-lang/crates.io-index" 250 - checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" 251 - 252 - [[package]] 253 - name = "itoa" 254 - version = "1.0.13" 255 - source = "registry+https://github.com/rust-lang/crates.io-index" 256 - checksum = "540654e97a3f4470a492cd30ff187bc95d89557a903a2bbf112e2fae98104ef2" 257 - 258 - [[package]] 259 - name = "libc" 260 - version = "0.2.164" 261 - source = "registry+https://github.com/rust-lang/crates.io-index" 262 - checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" 263 - 264 - [[package]] 265 - name = "linux-raw-sys" 266 - version = "0.4.14" 267 - source = "registry+https://github.com/rust-lang/crates.io-index" 268 - checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" 269 - 270 - [[package]] 271 - name = "lock_api" 272 - version = "0.4.12" 273 - source = "registry+https://github.com/rust-lang/crates.io-index" 274 - checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" 275 - dependencies = [ 276 - "autocfg", 277 - "scopeguard", 278 - ] 279 - 280 - [[package]] 281 - name = "log" 282 - version = "0.4.22" 283 - source = "registry+https://github.com/rust-lang/crates.io-index" 284 - checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" 285 - 286 - [[package]] 287 - name = "memchr" 288 - version = "2.7.4" 289 - source = "registry+https://github.com/rust-lang/crates.io-index" 290 - checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 291 - 292 - [[package]] 293 - name = "mio" 294 - version = "0.8.11" 295 - source = "registry+https://github.com/rust-lang/crates.io-index" 296 - checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" 297 - dependencies = [ 298 - "libc", 299 - "log", 300 - "wasi", 301 - "windows-sys 0.48.0", 302 - ] 303 - 304 - [[package]] 305 - name = "newline-converter" 306 - version = "0.3.0" 307 - source = "registry+https://github.com/rust-lang/crates.io-index" 308 - checksum = "47b6b097ecb1cbfed438542d16e84fd7ad9b0c76c8a65b7f9039212a3d14dc7f" 309 - dependencies = [ 310 - "unicode-segmentation", 311 - ] 312 - 313 - [[package]] 314 - name = "once_cell" 315 - version = "1.20.2" 316 - source = "registry+https://github.com/rust-lang/crates.io-index" 317 - checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" 318 - 319 - [[package]] 320 - name = "parking_lot" 321 - version = "0.12.3" 322 - source = "registry+https://github.com/rust-lang/crates.io-index" 323 - checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" 324 - dependencies = [ 325 - "lock_api", 326 - "parking_lot_core", 327 - ] 328 - 329 - [[package]] 330 - name = "parking_lot_core" 331 - version = "0.9.10" 332 - source = "registry+https://github.com/rust-lang/crates.io-index" 333 - checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" 334 - dependencies = [ 335 - "cfg-if", 336 - "libc", 337 - "redox_syscall", 338 - "smallvec", 339 - "windows-targets 0.52.6", 340 - ] 341 - 342 - [[package]] 343 - name = "proc-macro2" 344 - version = "1.0.92" 345 - source = "registry+https://github.com/rust-lang/crates.io-index" 346 - checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" 347 - dependencies = [ 348 - "unicode-ident", 349 - ] 350 - 351 - [[package]] 352 - name = "quote" 353 - version = "1.0.37" 354 - source = "registry+https://github.com/rust-lang/crates.io-index" 355 - checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" 356 - dependencies = [ 357 - "proc-macro2", 358 - ] 359 - 360 - [[package]] 361 - name = "redox_syscall" 362 - version = "0.5.7" 363 - source = "registry+https://github.com/rust-lang/crates.io-index" 364 - checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" 365 - dependencies = [ 366 - "bitflags 2.6.0", 367 - ] 368 - 369 - [[package]] 370 - name = "regex" 371 - version = "1.11.1" 372 - source = "registry+https://github.com/rust-lang/crates.io-index" 373 - checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" 374 - dependencies = [ 375 - "aho-corasick", 376 - "memchr", 377 - "regex-automata", 378 - "regex-syntax", 379 - ] 380 - 381 - [[package]] 382 - name = "regex-automata" 383 - version = "0.4.9" 384 - source = "registry+https://github.com/rust-lang/crates.io-index" 385 - checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" 386 - dependencies = [ 387 - "aho-corasick", 388 - "memchr", 389 - "regex-syntax", 390 - ] 391 - 392 - [[package]] 393 - name = "regex-syntax" 394 - version = "0.8.5" 395 - source = "registry+https://github.com/rust-lang/crates.io-index" 396 - checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" 397 - 398 - [[package]] 399 - name = "rustix" 400 - version = "0.38.39" 401 - source = "registry+https://github.com/rust-lang/crates.io-index" 402 - checksum = "375116bee2be9ed569afe2154ea6a99dfdffd257f533f187498c2a8f5feaf4ee" 403 - dependencies = [ 404 - "bitflags 2.6.0", 405 - "errno", 406 - "libc", 407 - "linux-raw-sys", 408 - "windows-sys 0.52.0", 409 - ] 410 - 411 - [[package]] 412 - name = "ryu" 413 - version = "1.0.18" 414 - source = "registry+https://github.com/rust-lang/crates.io-index" 415 - checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" 416 - 417 - [[package]] 418 - name = "scopeguard" 419 - version = "1.2.0" 420 - source = "registry+https://github.com/rust-lang/crates.io-index" 421 - checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 422 - 423 - [[package]] 424 - name = "serde" 425 - version = "1.0.215" 426 - source = "registry+https://github.com/rust-lang/crates.io-index" 427 - checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" 428 - dependencies = [ 429 - "serde_derive", 430 - ] 431 - 432 - [[package]] 433 - name = "serde_derive" 434 - version = "1.0.215" 435 - source = "registry+https://github.com/rust-lang/crates.io-index" 436 - checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" 437 - dependencies = [ 438 - "proc-macro2", 439 - "quote", 440 - "syn", 441 - ] 442 - 443 - [[package]] 444 - name = "serde_json" 445 - version = "1.0.133" 446 - source = "registry+https://github.com/rust-lang/crates.io-index" 447 - checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" 448 - dependencies = [ 449 - "itoa", 450 - "memchr", 451 - "ryu", 452 - "serde", 453 - ] 454 - 455 - [[package]] 456 - name = "signal-hook" 457 - version = "0.3.17" 458 - source = "registry+https://github.com/rust-lang/crates.io-index" 459 - checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" 460 - dependencies = [ 461 - "libc", 462 - "signal-hook-registry", 463 - ] 464 - 465 - [[package]] 466 - name = "signal-hook-mio" 467 - version = "0.2.4" 468 - source = "registry+https://github.com/rust-lang/crates.io-index" 469 - checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd" 470 - dependencies = [ 471 - "libc", 472 - "mio", 473 - "signal-hook", 474 - ] 475 - 476 - [[package]] 477 - name = "signal-hook-registry" 478 - version = "1.4.2" 479 - source = "registry+https://github.com/rust-lang/crates.io-index" 480 - checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" 481 - dependencies = [ 482 - "libc", 483 - ] 484 - 485 - [[package]] 486 - name = "smallvec" 487 - version = "1.13.2" 488 - source = "registry+https://github.com/rust-lang/crates.io-index" 489 - checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" 490 - 491 - [[package]] 492 - name = "strsim" 493 - version = "0.11.1" 494 - source = "registry+https://github.com/rust-lang/crates.io-index" 495 - checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" 496 - 497 - [[package]] 498 - name = "syn" 499 - version = "2.0.89" 500 - source = "registry+https://github.com/rust-lang/crates.io-index" 501 - checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" 502 - dependencies = [ 503 - "proc-macro2", 504 - "quote", 505 - "unicode-ident", 506 - ] 507 - 508 - [[package]] 509 - name = "tempfile" 510 - version = "3.14.0" 511 - source = "registry+https://github.com/rust-lang/crates.io-index" 512 - checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" 513 - dependencies = [ 514 - "cfg-if", 515 - "fastrand", 516 - "once_cell", 517 - "rustix", 518 - "windows-sys 0.59.0", 519 - ] 520 - 521 - [[package]] 522 - name = "thread_local" 523 - version = "1.1.8" 524 - source = "registry+https://github.com/rust-lang/crates.io-index" 525 - checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" 526 - dependencies = [ 527 - "cfg-if", 528 - "once_cell", 529 - ] 530 - 531 - [[package]] 532 - name = "unicode-ident" 533 - version = "1.0.14" 534 - source = "registry+https://github.com/rust-lang/crates.io-index" 535 - checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" 536 - 537 - [[package]] 538 - name = "unicode-segmentation" 539 - version = "1.12.0" 540 - source = "registry+https://github.com/rust-lang/crates.io-index" 541 - checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" 542 - 543 - [[package]] 544 - name = "unicode-width" 545 - version = "0.1.14" 546 - source = "registry+https://github.com/rust-lang/crates.io-index" 547 - checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" 548 - 549 - [[package]] 550 - name = "utf8parse" 551 - version = "0.2.2" 552 - source = "registry+https://github.com/rust-lang/crates.io-index" 553 - checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 554 - 555 - [[package]] 556 - name = "wasi" 557 - version = "0.11.0+wasi-snapshot-preview1" 558 - source = "registry+https://github.com/rust-lang/crates.io-index" 559 - checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 560 - 561 - [[package]] 562 - name = "winapi" 563 - version = "0.3.9" 564 - source = "registry+https://github.com/rust-lang/crates.io-index" 565 - checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 566 - dependencies = [ 567 - "winapi-i686-pc-windows-gnu", 568 - "winapi-x86_64-pc-windows-gnu", 569 - ] 570 - 571 - [[package]] 572 - name = "winapi-i686-pc-windows-gnu" 573 - version = "0.4.0" 574 - source = "registry+https://github.com/rust-lang/crates.io-index" 575 - checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 576 - 577 - [[package]] 578 - name = "winapi-x86_64-pc-windows-gnu" 579 - version = "0.4.0" 580 - source = "registry+https://github.com/rust-lang/crates.io-index" 581 - checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 582 - 583 - [[package]] 584 - name = "windows-sys" 585 - version = "0.48.0" 586 - source = "registry+https://github.com/rust-lang/crates.io-index" 587 - checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 588 - dependencies = [ 589 - "windows-targets 0.48.5", 590 - ] 591 - 592 - [[package]] 593 - name = "windows-sys" 594 - version = "0.52.0" 595 - source = "registry+https://github.com/rust-lang/crates.io-index" 596 - checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 597 - dependencies = [ 598 - "windows-targets 0.52.6", 599 - ] 600 - 601 - [[package]] 602 - name = "windows-sys" 603 - version = "0.59.0" 604 - source = "registry+https://github.com/rust-lang/crates.io-index" 605 - checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 606 - dependencies = [ 607 - "windows-targets 0.52.6", 608 - ] 609 - 610 - [[package]] 611 - name = "windows-targets" 612 - version = "0.48.5" 613 - source = "registry+https://github.com/rust-lang/crates.io-index" 614 - checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 615 - dependencies = [ 616 - "windows_aarch64_gnullvm 0.48.5", 617 - "windows_aarch64_msvc 0.48.5", 618 - "windows_i686_gnu 0.48.5", 619 - "windows_i686_msvc 0.48.5", 620 - "windows_x86_64_gnu 0.48.5", 621 - "windows_x86_64_gnullvm 0.48.5", 622 - "windows_x86_64_msvc 0.48.5", 623 - ] 624 - 625 - [[package]] 626 - name = "windows-targets" 627 - version = "0.52.6" 628 - source = "registry+https://github.com/rust-lang/crates.io-index" 629 - checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 630 - dependencies = [ 631 - "windows_aarch64_gnullvm 0.52.6", 632 - "windows_aarch64_msvc 0.52.6", 633 - "windows_i686_gnu 0.52.6", 634 - "windows_i686_gnullvm", 635 - "windows_i686_msvc 0.52.6", 636 - "windows_x86_64_gnu 0.52.6", 637 - "windows_x86_64_gnullvm 0.52.6", 638 - "windows_x86_64_msvc 0.52.6", 639 - ] 640 - 641 - [[package]] 642 - name = "windows_aarch64_gnullvm" 643 - version = "0.48.5" 644 - source = "registry+https://github.com/rust-lang/crates.io-index" 645 - checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 646 - 647 - [[package]] 648 - name = "windows_aarch64_gnullvm" 649 - version = "0.52.6" 650 - source = "registry+https://github.com/rust-lang/crates.io-index" 651 - checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 652 - 653 - [[package]] 654 - name = "windows_aarch64_msvc" 655 - version = "0.48.5" 656 - source = "registry+https://github.com/rust-lang/crates.io-index" 657 - checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 658 - 659 - [[package]] 660 - name = "windows_aarch64_msvc" 661 - version = "0.52.6" 662 - source = "registry+https://github.com/rust-lang/crates.io-index" 663 - checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 664 - 665 - [[package]] 666 - name = "windows_i686_gnu" 667 - version = "0.48.5" 668 - source = "registry+https://github.com/rust-lang/crates.io-index" 669 - checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 670 - 671 - [[package]] 672 - name = "windows_i686_gnu" 673 - version = "0.52.6" 674 - source = "registry+https://github.com/rust-lang/crates.io-index" 675 - checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 676 - 677 - [[package]] 678 - name = "windows_i686_gnullvm" 679 - version = "0.52.6" 680 - source = "registry+https://github.com/rust-lang/crates.io-index" 681 - checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 682 - 683 - [[package]] 684 - name = "windows_i686_msvc" 685 - version = "0.48.5" 686 - source = "registry+https://github.com/rust-lang/crates.io-index" 687 - checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 688 - 689 - [[package]] 690 - name = "windows_i686_msvc" 691 - version = "0.52.6" 692 - source = "registry+https://github.com/rust-lang/crates.io-index" 693 - checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 694 - 695 - [[package]] 696 - name = "windows_x86_64_gnu" 697 - version = "0.48.5" 698 - source = "registry+https://github.com/rust-lang/crates.io-index" 699 - checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 700 - 701 - [[package]] 702 - name = "windows_x86_64_gnu" 703 - version = "0.52.6" 704 - source = "registry+https://github.com/rust-lang/crates.io-index" 705 - checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 706 - 707 - [[package]] 708 - name = "windows_x86_64_gnullvm" 709 - version = "0.48.5" 710 - source = "registry+https://github.com/rust-lang/crates.io-index" 711 - checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 712 - 713 - [[package]] 714 - name = "windows_x86_64_gnullvm" 715 - version = "0.52.6" 716 - source = "registry+https://github.com/rust-lang/crates.io-index" 717 - checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 718 - 719 - [[package]] 720 - name = "windows_x86_64_msvc" 721 - version = "0.48.5" 722 - source = "registry+https://github.com/rust-lang/crates.io-index" 723 - checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 724 - 725 - [[package]] 726 - name = "windows_x86_64_msvc" 727 - version = "0.52.6" 728 - source = "registry+https://github.com/rust-lang/crates.io-index" 729 - checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
-12
create-sys/Cargo.toml
··· 1 - [package] 2 - name = "create-sys" 3 - version = "0.1.0" 4 - edition = "2021" 5 - 6 - [dependencies] 7 - anyhow = "1.0.93" 8 - clap = { version = "4.5.21", features = ["derive"] } 9 - inquire = { version = "0.7.5", features = ["editor"] } 10 - regex = "1.11.1" 11 - serde = "1.0.215" 12 - serde_json = "1.0.133"
-217
create-sys/src/add.rs
··· 1 - use std::{ 2 - fs, 3 - path::Path, 4 - process::{Command, Stdio}, 5 - }; 6 - 7 - use inquire::{validator::Validation, Confirm, Editor, MultiSelect, Select, Text}; 8 - 9 - use crate::prelude::*; 10 - 11 - fn list_roles(roles_folder: &Path) -> Result<Vec<String>> { 12 - Ok(fs::read_dir(roles_folder) 13 - .context("Failed to read roles")? 14 - .into_iter() 15 - .filter_map(|r| { 16 - r.ok() 17 - .map(|d| d.file_name().to_string_lossy().trim_end_matches(".nix").to_string()) 18 - .filter(|n| !n.contains('+')) 19 - }) 20 - .collect()) 21 - } 22 - 23 - const NO_HARDWARE_MOD: &str = "No NixOS Hardware Module"; 24 - 25 - fn list_hardware_modules() -> Result<Vec<String>> { 26 - let mut cmd = Command::new("nix"); 27 - cmd.arg("eval") 28 - .arg("github:nixos/nixos-hardware#nixosModules") 29 - .arg("--raw") 30 - .arg("--apply") 31 - .arg("s: builtins.toJSON (builtins.attrNames s)") 32 - .stdout(Stdio::piped()) 33 - .stderr(Stdio::null()); 34 - 35 - let output = cmd.output().context("Failed to fetch systems")?.stdout; 36 - let mut modules: Vec<String> = serde_json::from_slice(&output).context("Failed to parse systems")?; 37 - 38 - modules.insert(0, NO_HARDWARE_MOD.into()); 39 - 40 - Ok(modules) 41 - } 42 - 43 - fn list_targets() -> Result<Vec<String>> { 44 - let mut cmd = Command::new("nix"); 45 - cmd.arg("eval") 46 - .arg("nixpkgs#lib.systems.flakeExposed") 47 - .arg("--raw") 48 - .arg("--apply") 49 - .arg("builtins.toJSON") 50 - .stdout(Stdio::piped()) 51 - .stderr(Stdio::null()); 52 - 53 - let output = cmd.output().context("Failed to fetch systems")?.stdout; 54 - let modules = serde_json::from_slice(&output).context("Failed to parse systems")?; 55 - Ok(modules) 56 - } 57 - 58 - fn get_nixpkgs_version() -> Result<String> { 59 - let mut cmd = Command::new("nix"); 60 - cmd.arg("eval") 61 - .arg("nixpkgs#lib.version") 62 - .arg("--raw") 63 - .stdout(Stdio::piped()) 64 - .stderr(Stdio::null()); 65 - 66 - 67 - let output = cmd.output().context("Failed to fetch systems")?.stdout; 68 - let output = String::from_utf8_lossy(&output); 69 - 70 - let otp = output.trim().split('.').take(2).collect::<Vec<_>>(); 71 - 72 - Ok(otp.join(".")) 73 - } 74 - 75 - 76 - fn gen_hardware_config(root: Option<&Path>) -> Result<String> { 77 - let mut cmd = Command::new("nixos-generate-config"); 78 - cmd.arg("--show-hardware-config").stdout(Stdio::piped()); 79 - 80 - if let Some(root) = root { 81 - cmd.arg("--root").arg(root); 82 - } 83 - 84 - let output = cmd.output().context("Failed to fetch systems")?.stdout; 85 - let output = String::from_utf8_lossy(&output); 86 - 87 - let otp = output.trim().split('\n').skip(3).collect::<Vec<_>>(); 88 - Ok(format!("({})", otp.join("\n"))) 89 - } 90 - 91 - struct System { 92 - name: String, 93 - description: String, 94 - edition: String, 95 - target: String, 96 - include_base_mods: bool, 97 - roles: Vec<String>, 98 - hardware_config: String, 99 - hardware_mod: String, 100 - } 101 - 102 - fn dialog(flake_root: &Path) -> Result<System> { 103 - // Name 104 - 105 - let fl_root_val = flake_root.to_owned(); 106 - 107 - let system_filter = move |name: &str| { 108 - Ok(if !name.is_empty() && name.chars().all(|c| c.is_ascii_lowercase() || c.is_ascii_digit() || c == '-') { 109 - if fl_root_val.join("systems").join(format!("{name}.nix")).is_file() { 110 - Validation::Invalid("System config already exists!".into()) 111 - } else { 112 - Validation::Valid 113 - } 114 - } else { 115 - Validation::Invalid("System configs should use kebab-case".into()) 116 - }) 117 - }; 118 - 119 - let system_name = Text::new("Enter a name for the new system") 120 - .with_validator(system_filter) 121 - .prompt() 122 - .context("Failed to get system name")?; 123 - 124 - // Target 125 - 126 - let targets = list_targets().context("Failed to get targets")?; 127 - let system_target = Select::new("Select what arch/OS this system will target", targets) 128 - .prompt() 129 - .context("Failed to prompt for system target")?; 130 - 131 - // Description 132 - 133 - let description = Text::new("Enter system description") 134 - .prompt_skippable() 135 - .context("Failed to prompt for description")? 136 - .unwrap_or_else(|| "Generic".to_string()); 137 - 138 - // Base Mods 139 - 140 - let include_base_mods = Confirm::new("Should this system include base modules?") 141 - .with_default(true) 142 - .prompt() 143 - .context("Failed to prompt")?; 144 - 145 - // Generate Hardware Config? 146 - 147 - let gen_hw_config = Confirm::new("Would you like to auto-generate a hardware configuration for this system with `nixos-generate-config`?").prompt().context("Failed to prompt")?; 148 - let hw_config = if gen_hw_config { 149 - gen_hardware_config(None).context("Failed to generate hw config")? 150 - } else { 151 - String::new() 152 - }; 153 - 154 - // NixOS Hardware 155 - 156 - let hardware_mod = if let Ok(modules) = list_hardware_modules() { 157 - let hardware_mod = Select::new("(Optional) Select a NixOS Hardware Module for the System", modules).with_starting_cursor(0).prompt().context("Failed to prompt for hw modules")?; 158 - if hardware_mod == NO_HARDWARE_MOD { 159 - String::new() 160 - } else { 161 - hardware_mod 162 - } 163 - } else { 164 - println!("Failed to fetch modules from NixOS hardware, continuing..."); 165 - String::new() 166 - }; 167 - 168 - // Asking For System Roles 169 - 170 - let roles_path = flake_root.join("roles"); 171 - let roles = list_roles(&roles_path).context("Failed to list roles")?; 172 - let selected_roles = MultiSelect::new("Select the roles for this new system", roles) 173 - .prompt() 174 - .context("Failed to promp user for roles")?; 175 - 176 - Ok(System { 177 - name: system_name, 178 - description: description, 179 - target: system_target, 180 - roles: selected_roles.into_iter().map(|r| format!("\"{r}\"")).collect(), 181 - edition: get_nixpkgs_version().context("Failed to get latest")?, 182 - include_base_mods, 183 - hardware_config: hw_config, 184 - hardware_mod, 185 - }) 186 - } 187 - 188 - impl System { 189 - 190 - const FILE_TEMPLATE: &str = include_str!("sys_template.nix"); 191 - 192 - fn generate_file(&self) -> String { 193 - Self::FILE_TEMPLATE 194 - .replace("__TARGET__", &self.target) 195 - .replace("__DESCRIPTION__", &self.description) 196 - .replace("__EDITION__", &self.edition) 197 - .replace("__INCL_BASE_MODS__", &self.include_base_mods.to_string()) 198 - .replace("__ROLES__", &self.roles.join(" ")) 199 - .replace("__HARDWARE_MOD__", &self.hardware_mod) 200 - .replace("__HARDWARE_CONFIG__", &self.hardware_config) 201 - } 202 - 203 - } 204 - 205 - pub fn add_system_dialog(flake_root: &Path) -> Result { 206 - let sys = dialog(flake_root)?; 207 - 208 - let file = sys.generate_file(); 209 - 210 - let edited_file = Editor::new("Review the new system file with (e), confirm with (enter)").with_predefined_text(&file).with_file_extension(".nix").prompt().context("Failed to get edits")?; 211 - 212 - let path = flake_root.join("systems").join(format!("{}.nix", sys.name)); 213 - 214 - println!("Saving New File to {}", path.display()); 215 - 216 - fs::write(path, &edited_file).context("Failed to write new file") 217 - }
-22
create-sys/src/main.rs
··· 1 - use clap::clap_derive::Parser; 2 - 3 - mod add; 4 - 5 - mod prelude { 6 - use anyhow::Error as AError; 7 - use std::result::Result as SResult; 8 - 9 - pub type Result<T = (), E = AError> = SResult<T, E>; 10 - pub use anyhow::Context; 11 - } 12 - 13 - use prelude::*; 14 - 15 - #[derive(Parser)] 16 - struct Cli {} 17 - 18 - fn main() -> Result { 19 - let dir = std::env::current_dir()?; 20 - let dir = dir.parent().context("")?; 21 - add::add_system_dialog(dir) 22 - }
-18
create-sys/src/sys_template.nix
··· 1 - { 2 - target = "__TARGET__"; 3 - extraOverlays = []; 4 - 5 - eval = {inputs, ...}: { 6 - description = "__DESCRIPTION__"; 7 - 8 - edition = "__EDITION__"; 9 - 10 - includeBaseMods = __INCL_BASE_MODS__; 11 - 12 - roles = [__ROLES__]; 13 - extraModules = [ 14 - __HARDWARE_MOD__ 15 - __HARDWARE_CONFIG__ 16 - ]; 17 - }; 18 - }
+22 -1
flake.lock
··· 149 149 "flakelight": { 150 150 "inputs": { 151 151 "nixpkgs": [ 152 + "nixpkgs" 153 + ] 154 + }, 155 + "locked": { 156 + "lastModified": 1738586370, 157 + "narHash": "sha256-oNDm2sfLm9jdfOskRq2ABn85gwXusbsHEOC181peno4=", 158 + "owner": "nix-community", 159 + "repo": "flakelight", 160 + "rev": "d05bcabfc1efb84a7d8689de6e50b84d7f23b427", 161 + "type": "github" 162 + }, 163 + "original": { 164 + "owner": "nix-community", 165 + "repo": "flakelight", 166 + "type": "github" 167 + } 168 + }, 169 + "flakelight_2": { 170 + "inputs": { 171 + "nixpkgs": [ 152 172 "nu_plugin_dbus", 153 173 "nixpkgs" 154 174 ] ··· 465 485 }, 466 486 "nu_plugin_dbus": { 467 487 "inputs": { 468 - "flakelight": "flakelight", 488 + "flakelight": "flakelight_2", 469 489 "nixpkgs": [ 470 490 "nixpkgs" 471 491 ] ··· 537 557 "root": { 538 558 "inputs": { 539 559 "catppuccin": "catppuccin", 560 + "flakelight": "flakelight", 540 561 "gh-grader-preview": "gh-grader-preview", 541 562 "hm": "hm", 542 563 "imperm": "imperm",
+19 -26
flake.nix
··· 3 3 4 4 inputs = { 5 5 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 + flakelight.url = "github:nix-community/flakelight"; 7 + flakelight.inputs.nixpkgs.follows = "nixpkgs"; 6 8 nix-index-db.url = "github:Mic92/nix-index-database"; 7 9 nix-index-db.inputs.nixpkgs.follows = "nixpkgs"; 8 10 hm.url = "github:nix-community/home-manager"; ··· 29 31 outputs = inputs @ { 30 32 self, 31 33 nixpkgs, 34 + flakelight, 32 35 nix-index-db, 33 36 hm, 34 37 nixos-hardware, ··· 40 43 nixvim, 41 44 imperm, 42 45 nu_plugin_dbus, 43 - }: let 44 - lib = (import ./lib.nix) nixpkgs.lib; 45 - pkgsFor = system: 46 - import nixpkgs { 47 - inherit system; 46 + }: 47 + flakelight ./. { 48 + inherit inputs; 49 + formatters = pkgs: { 50 + "*.nix" = pkgs.lib.getExe pkgs.alejandra; 51 + "*.sh" = pkgs.lib.getExe pkgs.shfmt; 52 + }; 53 + packages = 54 + nixpkgs.lib.genAttrs ["gh-grader-preview" "wayland-mpris-idle-inhibit" "nu_plugin_dbus"] 55 + (i: {pkgs}: let input = builtins.getAttr i inputs; in input.packages.${pkgs.system}.default); 56 + nixDir = ./.; 57 + nixDirAliases = { 58 + nixosConfigurations = ["systemConfigs"]; 48 59 }; 49 - baseMods = builtins.map (name: "${self}/base/${name}") (builtins.attrNames (builtins.readDir ./base)); 50 - availableRoles = lib.getRoles ./roles; 51 - mkSystem = lib.mkmkSystem { 52 - inherit baseMods availableRoles; 53 - specialArgs = { 54 - inherit inputs; 60 + legacyPackages = pkgs: pkgs; 61 + nixpkgs.config = { 62 + allowUnfree = true; 55 63 }; 56 64 }; 57 - in { 58 - inherit lib; 59 - legacyPackages = lib.forAllSystems pkgsFor; 60 - formatter = lib.forAllSystems (system: (pkgsFor system).alejandra); 61 - nixosConfigurations = builtins.mapAttrs (name: value: let 62 - sys = value.eval { 63 - inherit inputs; 64 - }; 65 - in 66 - mkSystem (sys 67 - // { 68 - target = value.target; 69 - inherit name; 70 - })) (lib.parseAllFiles ./systems); 71 - }; 72 65 }
+12 -74
lib.nix
··· 1 - lib: rec { 2 - parseAllFiles = folder: 3 - lib.mapAttrs' (fileName: _: let 4 - parsed = import (folder + "/${fileName}"); 5 - in { 6 - name = builtins.head (lib.splitString "." fileName); 7 - value = parsed; 8 - }) 9 - (builtins.readDir 10 - folder); 11 - getRoles = folder: 12 - lib.mapAttrs' ( 13 - nodeName: nodeType: let 14 - c = 15 - if nodeType == "regular" 16 - then builtins.map (x: x) [(folder + "/${nodeName}")] 17 - else builtins.map (name: (folder + "/${nodeName}/${name}")) (builtins.attrNames (builtins.readDir "${folder}/${nodeName}")); 18 - in { 19 - name = builtins.head (lib.splitString "." nodeName); 20 - value = c; 21 - } 22 - ) (builtins.readDir folder); 23 - forAllSystems = lib.genAttrs lib.systems.flakeExposed; 24 - roleActive = role: selected: builtins.all (r: builtins.elem r selected) (lib.splitString "+" role); 25 - filterRoles = availableRoles: roles: 26 - lib.attrsets.filterAttrs ( 27 - name: _: roleActive name roles 28 - ) 29 - availableRoles; 30 - mkmkSystem = { 31 - baseMods, 32 - specialArgs, 33 - availableRoles, 34 - }: { 35 - name, 36 - description, 37 - target, 38 - edition, 39 - roles, 40 - extraModules, 41 - includeBaseMods, 42 - }: 43 - lib.nixosSystem { 44 - specialArgs = {inherit edition target;} // specialArgs; 45 - 46 - modules = 47 - [ 48 - specialArgs.inputs.hm.nixosModules.default 49 - specialArgs.inputs.nix-index-db.nixosModules.nix-index 50 - { 51 - nixpkgs = { 52 - system = target; 53 - config.allowUnfree = true; 54 - }; 55 - 56 - networking.hostName = name; 57 - environment.variables."HOSTNAME" = name; 58 - environment.etc."flake-src".source = specialArgs.inputs.self; 59 - home-manager.extraSpecialArgs = specialArgs; 60 - home-manager.useGlobalPkgs = true; 61 - home-manager.useUserPackages = true; 62 - system.stateVersion = edition; 63 - } 64 - ] 65 - ++ ( 66 - if includeBaseMods 67 - then baseMods 68 - else [] 69 - ) 70 - ++ lib.flatten (builtins.attrValues ( 71 - filterRoles availableRoles roles 72 - )) 73 - ++ extraModules; 74 - }; 1 + { 2 + outputs, 3 + lib, 4 + ... 5 + }: let 6 + roleEnabled = selected: role: builtins.all (r: builtins.elem r selected) (lib.splitString "+" role); 7 + in { 8 + applyRoles = roleList: let 9 + filteredRoles = lib.filterAttrs (n: _v: roleEnabled roleList n) outputs.nixosModules; 10 + in { 11 + imports = builtins.attrValues filteredRoles; 12 + }; 75 13 }
+10
nixosModules/base/base.nix
··· 1 + { 2 + inputs, 3 + config, 4 + ... 5 + }: { 6 + environment.variables."HOSTNAME" = config.networking.hostName; 7 + environment.etc."flake-src".source = inputs.self; 8 + home-manager.useGlobalPkgs = true; 9 + home-manager.useUserPackages = true; 10 + }
+24
nixosModules/default.nix
··· 1 + {lib, ...}: let 2 + allNodesOf = nodeType: dir: lib.attrNames (lib.filterAttrs (_n: v: v == nodeType) dir); 3 + allRoles = builtins.readDir ./.; 4 + allNixFiles = dir: 5 + lib.pipe (builtins.readDir dir) [ 6 + (allNodesOf "regular") 7 + (builtins.filter (s: s != "default.nix")) 8 + (builtins.filter (lib.hasSuffix ".nix")) 9 + ]; 10 + 11 + # Flat Roles: roles that are normal .nix file in nixosModules/ 12 + rolesFiles = builtins.map (lib.removeSuffix ".nix") (allNixFiles ./.); 13 + flatRoles = lib.genAttrs rolesFiles (p: ./. + "/${p}.nix"); 14 + 15 + # Nested Roles: roles that are a folder containing a number of .nix files 16 + rolesDirs = allNodesOf "directory" allRoles; 17 + createNestedRole = dir: let 18 + nixFiles = allNixFiles (./. + "/${dir}"); 19 + in { 20 + imports = builtins.map (f: ./. + "/${dir}" + "/${f}") nixFiles; 21 + }; 22 + nestedRoles = lib.genAttrs rolesDirs createNestedRole; 23 + in 24 + flatRoles // nestedRoles
pkgs/nvim-mdx.nix packages/nvim-mdx.nix
pkgs/rdrview.nix packages/rdrview.nix
pkgs/theming.nix packages/theming.nix
roles/black-mesa-cache.nix nixosModules/black-mesa-cache.nix
roles/dev+graphics/code.nix nixosModules/dev+graphics/code.nix
roles/dev+graphics/misc.nix nixosModules/dev+graphics/misc.nix
roles/dev+graphics/nvim.nix nixosModules/dev+graphics/nvim.nix
roles/dev/dotnet.nix nixosModules/dev/dotnet.nix
roles/dev/git.nix nixosModules/dev/git.nix
roles/dev/js.nix nixosModules/dev/js.nix
roles/dev/misc.nix nixosModules/dev/misc.nix
roles/dev/nix.nix nixosModules/dev/nix.nix
+13 -11
roles/dev/nvim.nix nixosModules/dev/nvim.nix
··· 160 160 } 161 161 ]; 162 162 163 - extraPlugins = with pkgs.vimPlugins; [{plugin = pkgs.callPackage "${inputs.self}/pkgs/nvim-mdx.nix" {};} {plugin = tiny-devicons-auto-colors-nvim;} {plugin = nvim-biscuits;}]; 163 + extraPlugins = with pkgs.vimPlugins; [{plugin = pkgs.nvim-mdx;} {plugin = tiny-devicons-auto-colors-nvim;} {plugin = nvim-biscuits;}]; 164 164 165 165 plugins = { 166 166 telescope = { ··· 270 270 in 271 271 [pad pad pad] 272 272 ++ (lib.intersperse pad [ 273 - (let 274 - banner = pkgs.runCommand "nvim-banner" {} ''${pkgs.toilet}/bin/toilet " NIXVIM " -f mono12 -F border > $out''; 275 - # bannerText = builtins.readFile banner; 276 - in 277 - cmd { 278 - command = ''mut i = 1; loop { let s = (open ${banner}) | ${pkgs.lolcat}/bin/lolcat -f -S $i; clear; print -n -r $s; sleep 50ms; $i += 3; }''; 279 - # Hardcoding to prevent IFD 280 - width = 83; #(builtins.stringLength (lib.trim (builtins.elemAt (lib.splitString "\n" bannerText) 1))) - 3; 281 - height = 12; #(builtins.length (lib.splitString "\n" bannerText)) - 1; 282 - }) 273 + ( 274 + let 275 + banner = pkgs.runCommand "nvim-banner" {} ''${pkgs.toilet}/bin/toilet " NIXVIM " -f mono12 -F border > $out''; 276 + # bannerText = builtins.readFile banner; 277 + in 278 + cmd { 279 + command = ''mut i = 1; loop { let s = (open ${banner}) | ${pkgs.lolcat}/bin/lolcat -f -S $i; clear; print -n -r $s; sleep 50ms; $i += 3; }''; 280 + # Hardcoding to prevent IFD 281 + width = 83; #(builtins.stringLength (lib.trim (builtins.elemAt (lib.splitString "\n" bannerText) 1))) - 3; 282 + height = 12; #(builtins.length (lib.splitString "\n" bannerText)) - 1; 283 + } 284 + ) 283 285 (grp [ 284 286 (btn { 285 287 val = " 󰉋 Open Project";
roles/dev/python.nix nixosModules/dev/python.nix
roles/dev/rust.nix nixosModules/dev/rust.nix
roles/flatpak.nix nixosModules/flatpak.nix
roles/fun+graphics.nix nixosModules/fun+graphics.nix
roles/fun.nix nixosModules/fun.nix
roles/games+graphics.nix nixosModules/games+graphics.nix
roles/graphics/apps.nix nixosModules/graphics/apps.nix
roles/graphics/audio.nix nixosModules/graphics/audio.nix
+12 -10
roles/graphics/firefox.nix nixosModules/graphics/firefox.nix
··· 150 150 urls = [{template = queryUrl;}]; 151 151 }; 152 152 mkEngine = aliases: queryUrl: iconExt: ( 153 - mkEngineForceFavicon aliases queryUrl (let 154 - noPath = 155 - lib.strings.concatStrings 156 - ( 157 - lib.strings.intersperse "/" 153 + mkEngineForceFavicon aliases queryUrl ( 154 + let 155 + noPath = 156 + lib.strings.concatStrings 158 157 ( 159 - lib.lists.take 3 160 - (lib.strings.splitString "/" queryUrl) 161 - ) 162 - ); 163 - in "${noPath}/favicon.${iconExt}") 158 + lib.strings.intersperse "/" 159 + ( 160 + lib.lists.take 3 161 + (lib.strings.splitString "/" queryUrl) 162 + ) 163 + ); 164 + in "${noPath}/favicon.${iconExt}" 165 + ) 164 166 ); 165 167 in { 166 168 # Dev
roles/graphics/fonts.nix nixosModules/graphics/fonts.nix
roles/graphics/greeter.nix nixosModules/graphics/greeter.nix
+2 -1
roles/graphics/hypr.nix nixosModules/graphics/hypr.nix
··· 87 87 mod, 88 88 dispatch, 89 89 }: 90 - builtins.genList (i: let 90 + builtins.genList 91 + (i: let 91 92 num = builtins.toString i; 92 93 in "${mod},${num},${dispatch},${ 93 94 if num == "0"
+2 -4
roles/graphics/idle.nix nixosModules/graphics/idle.nix
··· 1 1 { 2 2 pkgs, 3 - inputs, 4 - config, 5 - target, 3 + inputs', 6 4 ... 7 5 }: let 8 6 sunsetCmd = "${pkgs.wlsunset}/bin/wlsunset -S 6:00 -s 22:00"; ··· 13 11 wayland.windowManager.hyprland.settings = { 14 12 exec-once = [ 15 13 sunsetCmd 16 - ''${inputs.wayland-mpris-idle-inhibit.packages.${target}.default}/bin/wayland-mpris-idle-inhibit --ignore "kdeconnect" --ignore "playerctld"'' 14 + ''${inputs'.wayland-mpris-idle-inhibit.packages.default}/bin/wayland-mpris-idle-inhibit --ignore "kdeconnect" --ignore "playerctld"'' 17 15 ]; 18 16 19 17 bindl = [
roles/graphics/kitty.nix nixosModules/graphics/kitty.nix
roles/graphics/lock.nix nixosModules/graphics/lock.nix
+2 -3
roles/graphics/news.nix nixosModules/graphics/news.nix
··· 1 1 { 2 - config, 3 - lib, 4 2 pkgs, 5 3 inputs, 4 + config, 6 5 ... 7 6 }: let 8 7 yt-feed = id: { ··· 52 51 in { 53 52 environment.systemPackages = with pkgs; [ 54 53 w3m 55 - (callPackage "${inputs.self}/pkgs/rdrview.nix" {}) 54 + rdrview 56 55 ]; 57 56 58 57 home-manager.users.bean = {
roles/graphics/printing.nix nixosModules/graphics/printing.nix
roles/graphics/shell.nix nixosModules/graphics/shell.nix
roles/graphics/swaync.nix nixosModules/graphics/swaync.nix
+1 -1
roles/graphics/theming.nix nixosModules/graphics/theming.nix
··· 59 59 kdePackages.qt6ct 60 60 libsForQt5.qtstyleplugin-kvantum 61 61 kdePackages.qtstyleplugin-kvantum 62 - (callPackage "${inputs.self}/pkgs/theming.nix" {}) 62 + theming 63 63 adwaita-icon-theme # For fallback icons 64 64 ]; 65 65 }
roles/graphics/waybar.nix nixosModules/graphics/waybar.nix
roles/graphics/xdg.nix nixosModules/graphics/xdg.nix
roles/hypervisor+graphics.nix nixosModules/hypervisor+graphics.nix
roles/hypervisor.nix nixosModules/hypervisor.nix
roles/imperm+secureboot.nix nixosModules/imperm+secureboot.nix
roles/imperm.nix nixosModules/imperm.nix
roles/latest-linux.nix nixosModules/latest-linux.nix
roles/mc-server.nix nixosModules/mc-server.nix
roles/normalboot.nix nixosModules/normalboot.nix
roles/secureboot.nix nixosModules/secureboot.nix
roles/social+graphics/discord.nix nixosModules/social+graphics/discord.nix
roles/ssh.nix nixosModules/ssh.nix
roles/vm.nix nixosModules/vm.nix
roles/wireless.nix nixosModules/wireless.nix
+76
systemConfigs/aperture.nix
··· 1 + { 2 + inputs, 3 + outputs, 4 + ... 5 + }: { 6 + system = "x86_64-linux"; 7 + 8 + modules = [ 9 + (outputs.lib.applyRoles ["base" "latest-linux" "dev" "graphics" "games" "fun" "social" "imperm" "secureboot" "wireless" "hypervisor"]) 10 + inputs.nixos-hardware.nixosModules.framework-13th-gen-intel 11 + 12 + ( 13 + { 14 + config, 15 + lib, 16 + pkgs, 17 + modulesPath, 18 + inputs, 19 + outputs, 20 + ... 21 + }: { 22 + system.stateVersion = "25.05"; 23 + networking.hostName = "aperture"; 24 + 25 + services.fprintd.enable = true; 26 + 27 + boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"]; 28 + boot.initrd.kernelModules = []; 29 + boot.kernelModules = ["kvm-intel"]; 30 + boot.extraModulePackages = []; 31 + boot.binfmt.emulatedSystems = ["aarch64-linux"]; 32 + 33 + hardware.framework.enableKmod = false; 34 + 35 + fileSystems."/" = { 36 + fsType = "tmpfs"; 37 + options = ["size=512M" "mode=755"]; 38 + neededForBoot = true; 39 + }; 40 + 41 + fileSystems."/home" = { 42 + fsType = "tmpfs"; 43 + options = ["size=2G"]; 44 + neededForBoot = true; 45 + }; 46 + 47 + fileSystems."/boot" = { 48 + device = "/dev/disk/by-uuid/88E4-A64F"; 49 + fsType = "vfat"; 50 + options = ["fmask=0022" "dmask=0022" "nosuid" "nodev" "noexec" "noatime"]; 51 + }; 52 + 53 + fileSystems."/nix" = { 54 + device = "/dev/disk/by-uuid/fd9f484a-a5ef-4378-b054-d292b0204afb"; 55 + fsType = "ext4"; 56 + options = ["lazytime" "nodev" "nosuid"]; 57 + neededForBoot = true; 58 + }; 59 + 60 + boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/330c8e83-23cd-46bf-99b3-75a7f5d7c5dc"; 61 + boot.initrd.luks.devices."cryptswap".device = "/dev/disk/by-uuid/c599ad48-750b-458d-8361-601bee3eb066"; 62 + 63 + swapDevices = [ 64 + {device = "/dev/disk/by-uuid/834d0d23-6a06-416f-853f-36c6ce81f355";} 65 + ]; 66 + 67 + networking.useDHCP = lib.mkDefault true; 68 + 69 + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; 70 + hardware.enableRedistributableFirmware = lib.mkDefault true; 71 + hardware.cpu.intel.updateMicrocode = 72 + lib.mkDefault config.hardware.enableRedistributableFirmware; 73 + } 74 + ) 75 + ]; 76 + }
+57
systemConfigs/black-mesa.nix
··· 1 + {outputs, ...}: { 2 + system = "x86_64-linux"; 3 + 4 + modules = [ 5 + (outputs.lib.applyRoles ["base" "latest-linux" "ssh" "fun" "dev" "secureboot" "mc-server"]) 6 + ({ 7 + modulesPath, 8 + lib, 9 + config, 10 + ... 11 + }: { 12 + imports = [(modulesPath + "/installer/scan/not-detected.nix")]; 13 + networking.hostName = "black-mesa"; 14 + system.stateVersion = "25.05"; 15 + 16 + boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"]; 17 + boot.initrd.kernelModules = []; 18 + boot.kernelModules = ["kvm-amd"]; 19 + boot.extraModulePackages = []; 20 + 21 + fileSystems."/" = { 22 + device = "/dev/disk/by-uuid/77e539a3-813d-465b-ac11-8aad37300858"; 23 + fsType = "ext4"; 24 + }; 25 + 26 + fileSystems."/boot" = { 27 + device = "/dev/disk/by-uuid/605A-7728"; 28 + fsType = "vfat"; 29 + }; 30 + 31 + fileSystems."/mnt/storage" = { 32 + device = "/dev/sda1"; 33 + fsType = "btrfs"; 34 + }; 35 + 36 + swapDevices = []; 37 + 38 + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 39 + 40 + hardware.graphics.enable = true; 41 + 42 + networking.interfaces.enp4s0.wakeOnLan.enable = true; 43 + 44 + hardware.nvidia = { 45 + open = true; 46 + modesetting.enable = true; 47 + powerManagement.finegrained = false; 48 + }; 49 + 50 + services.nix-serve = { 51 + enable = true; 52 + secretKeyFile = "/etc/nix-serve-key"; 53 + openFirewall = true; 54 + }; 55 + }) 56 + ]; 57 + }
+52
systemConfigs/installer.nix
··· 1 + {outputs, ...}: { 2 + system = "x86_64-linux"; 3 + modules = [ 4 + (outputs.lib.applyRoles ["base" "latest-linux" "black-mesa-cache"]) 5 + ({ 6 + pkgs, 7 + lib, 8 + inputs, 9 + edition, 10 + config, 11 + modulesPath, 12 + ... 13 + }: { 14 + system.stateVersion = "25.05"; 15 + networking.hostName = "nixos-installer-bwc9876"; 16 + 17 + imports = [ 18 + "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" 19 + ]; 20 + 21 + services.kmscon = { 22 + enable = true; 23 + autologinUser = "bean"; 24 + fonts = [ 25 + { 26 + name = "FiraMono Nerd Font Mono"; 27 + package = pkgs.nerd-fonts.fira-mono; 28 + } 29 + ]; 30 + }; 31 + 32 + boot = rec { 33 + initrd.systemd.enable = false; 34 + supportedFilesystems = { 35 + btrfs = true; 36 + reiserfs = true; 37 + vfat = true; 38 + f2fs = true; 39 + xfs = true; 40 + ntfs = true; 41 + cifs = true; 42 + zfs = lib.mkForce false; 43 + }; 44 + initrd.supportedFilesystems = supportedFilesystems; 45 + }; 46 + 47 + environment.systemPackages = with pkgs; [ 48 + gptfdisk 49 + ]; 50 + }) 51 + ]; 52 + }
+24
systemConfigs/mann-co.nix
··· 1 + { 2 + inputs, 3 + outputs, 4 + ... 5 + }: { 6 + system = "aarch64-linux"; 7 + 8 + modules = [ 9 + (outputs.lib.applyRoles ["base" "ssh"]) 10 + { 11 + system.stateVersion = "25.05"; 12 + networking.hostName = "mann-co"; 13 + nixpkgs.overlays = [ 14 + (final: super: { 15 + makeModulesClosure = x: 16 + super.makeModulesClosure (x // {allowMissing = true;}); 17 + }) 18 + ]; 19 + } 20 + "${inputs.nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix" 21 + {disabledModules = ["${inputs.nixpkgs}/nixos/modules/profiles/base.nix"];} 22 + inputs.nixos-hardware.nixosModules.raspberry-pi-4 23 + ]; 24 + }
+10
systemConfigs/test.nix
··· 1 + {outputs, ...}: { 2 + system = "x86_64-linux"; 3 + modules = [ 4 + { 5 + system.stateVersion = "25.05"; 6 + networking.hostName = "test"; 7 + } 8 + (outputs.lib.applyRoles ["base" "latest-linux" "normalboot" "vm"]) 9 + ]; 10 + }
-75
systems/aperture.nix
··· 1 - { 2 - target = "x86_64-linux"; 3 - 4 - eval = {inputs, ...}: { 5 - description = "Framework 13 Laptop"; 6 - 7 - edition = "25.05"; 8 - 9 - includeBaseMods = true; 10 - 11 - roles = ["latest-linux" "dev" "graphics" "games" "fun" "social" "imperm" "secureboot" "wireless" "hypervisor"]; 12 - extraModules = [ 13 - inputs.nixos-hardware.nixosModules.framework-13th-gen-intel 14 - ( 15 - { 16 - config, 17 - lib, 18 - pkgs, 19 - modulesPath, 20 - ... 21 - }: { 22 - imports = [(modulesPath + "/installer/scan/not-detected.nix")]; 23 - 24 - services.fprintd.enable = true; 25 - 26 - boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"]; 27 - boot.initrd.kernelModules = []; 28 - boot.kernelModules = ["kvm-intel"]; 29 - boot.extraModulePackages = []; 30 - boot.binfmt.emulatedSystems = ["aarch64-linux"]; 31 - 32 - hardware.framework.enableKmod = false; 33 - 34 - fileSystems."/" = { 35 - fsType = "tmpfs"; 36 - options = ["size=512M" "mode=755"]; 37 - neededForBoot = true; 38 - }; 39 - 40 - fileSystems."/home" = { 41 - fsType = "tmpfs"; 42 - options = ["size=2G"]; 43 - neededForBoot = true; 44 - }; 45 - 46 - fileSystems."/boot" = { 47 - device = "/dev/disk/by-uuid/88E4-A64F"; 48 - fsType = "vfat"; 49 - options = ["fmask=0022" "dmask=0022" "nosuid" "nodev" "noexec" "noatime"]; 50 - }; 51 - 52 - fileSystems."/nix" = { 53 - device = "/dev/disk/by-uuid/fd9f484a-a5ef-4378-b054-d292b0204afb"; 54 - fsType = "ext4"; 55 - options = ["lazytime" "nodev" "nosuid"]; 56 - neededForBoot = true; 57 - }; 58 - 59 - boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/330c8e83-23cd-46bf-99b3-75a7f5d7c5dc"; 60 - boot.initrd.luks.devices."cryptswap".device = "/dev/disk/by-uuid/c599ad48-750b-458d-8361-601bee3eb066"; 61 - 62 - swapDevices = [ 63 - {device = "/dev/disk/by-uuid/834d0d23-6a06-416f-853f-36c6ce81f355";} 64 - ]; 65 - 66 - networking.useDHCP = lib.mkDefault true; 67 - 68 - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; 69 - hardware.cpu.intel.updateMicrocode = 70 - lib.mkDefault config.hardware.enableRedistributableFirmware; 71 - } 72 - ) 73 - ]; 74 - }; 75 - }
-64
systems/black-mesa.nix
··· 1 - { 2 - target = "x86_64-linux"; 3 - 4 - eval = {inputs, ...}: { 5 - description = "Generic Tower"; 6 - 7 - edition = "25.05"; 8 - 9 - includeBaseMods = true; 10 - 11 - roles = ["latest-linux" "ssh" "fun" "dev" "secureboot" "mc-server"]; 12 - 13 - extraModules = [ 14 - ({ 15 - modulesPath, 16 - lib, 17 - config, 18 - ... 19 - }: { 20 - imports = [(modulesPath + "/installer/scan/not-detected.nix")]; 21 - 22 - boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"]; 23 - boot.initrd.kernelModules = []; 24 - boot.kernelModules = ["kvm-amd"]; 25 - boot.extraModulePackages = []; 26 - 27 - fileSystems."/" = { 28 - device = "/dev/disk/by-uuid/77e539a3-813d-465b-ac11-8aad37300858"; 29 - fsType = "ext4"; 30 - }; 31 - 32 - fileSystems."/boot" = { 33 - device = "/dev/disk/by-uuid/605A-7728"; 34 - fsType = "vfat"; 35 - }; 36 - 37 - fileSystems."/mnt/storage" = { 38 - device = "/dev/sda1"; 39 - fsType = "btrfs"; 40 - }; 41 - 42 - swapDevices = []; 43 - 44 - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 45 - 46 - hardware.graphics.enable = true; 47 - 48 - networking.interfaces.enp4s0.wakeOnLan.enable = true; 49 - 50 - hardware.nvidia = { 51 - open = true; 52 - modesetting.enable = true; 53 - powerManagement.finegrained = false; 54 - }; 55 - 56 - services.nix-serve = { 57 - enable = true; 58 - secretKeyFile = "/etc/nix-serve-key"; 59 - openFirewall = true; 60 - }; 61 - }) 62 - ]; 63 - }; 64 - }
-57
systems/installer.nix
··· 1 - { 2 - target = "x86_64-linux"; 3 - 4 - eval = {...}: { 5 - description = "Installer ISO"; 6 - edition = "25.05"; 7 - 8 - includeBaseMods = true; 9 - 10 - roles = ["latest-linux" "black-mesa-cache"]; 11 - extraModules = [ 12 - ({ 13 - pkgs, 14 - lib, 15 - inputs, 16 - edition, 17 - config, 18 - modulesPath, 19 - ... 20 - }: { 21 - imports = [ 22 - "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" 23 - ]; 24 - 25 - services.kmscon = { 26 - enable = true; 27 - autologinUser = "bean"; 28 - fonts = [ 29 - { 30 - name = "FiraMono Nerd Font Mono"; 31 - package = pkgs.nerd-fonts.fira-mono; 32 - } 33 - ]; 34 - }; 35 - 36 - boot = rec { 37 - initrd.systemd.enable = false; 38 - supportedFilesystems = { 39 - btrfs = true; 40 - reiserfs = true; 41 - vfat = true; 42 - f2fs = true; 43 - xfs = true; 44 - ntfs = true; 45 - cifs = true; 46 - zfs = lib.mkForce false; 47 - }; 48 - initrd.supportedFilesystems = supportedFilesystems; 49 - }; 50 - 51 - environment.systemPackages = with pkgs; [ 52 - gptfdisk 53 - ]; 54 - }) 55 - ]; 56 - }; 57 - }
-25
systems/mann-co.nix
··· 1 - { 2 - target = "aarch64-linux"; 3 - 4 - eval = {inputs, ...}: { 5 - description = "Raspberry Pi 4 Model B"; 6 - edition = "25.05"; 7 - 8 - includeBaseMods = true; 9 - 10 - roles = ["ssh"]; 11 - extraModules = [ 12 - { 13 - nixpkgs.overlays = [ 14 - (final: super: { 15 - makeModulesClosure = x: 16 - super.makeModulesClosure (x // {allowMissing = true;}); 17 - }) 18 - ]; 19 - } 20 - "${inputs.nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix" 21 - {disabledModules = ["${inputs.nixpkgs}/nixos/modules/profiles/base.nix"];} 22 - inputs.nixos-hardware.nixosModules.raspberry-pi-4 23 - ]; 24 - }; 25 - }
-14
systems/test.nix
··· 1 - { 2 - target = "x86_64-linux"; 3 - 4 - eval = {...}: { 5 - description = "Test / Example System"; 6 - edition = "25.05"; 7 - 8 - includeBaseMods = true; 9 - 10 - roles = ["latest-linux" "normalboot" "vm"]; 11 - 12 - extraModules = []; 13 - }; 14 - }