nix machine / user configurations

drop fup

+196 -715
-114
CHANGELOG.md
··· 1 - # Changelog 2 - 3 - ## [v0.10.0](https://github.com/divnix/devos/tree/v0.10.0) (2021-05-24) 4 - 5 - **Implemented enhancements:** 6 - 7 - - Providing an interface to nixpkgs.config [\#237](https://github.com/divnix/devos/issues/237) 8 - - Making the user available in profiles [\#230](https://github.com/divnix/devos/issues/230) 9 - - copy evaluation store paths to iso [\#195](https://github.com/divnix/devos/issues/195) 10 - - Extract custom system builds from devosSystem out of lib [\#170](https://github.com/divnix/devos/issues/170) 11 - - Allow setting of channel host-wide [\#117](https://github.com/divnix/devos/issues/117) 12 - - alacritty: CSIu support [\#51](https://github.com/divnix/devos/issues/51) 13 - 14 - **Fixed bugs:** 15 - 16 - - Cachix timeouts + how to disable nrdxp cachix \(if needed\) [\#294](https://github.com/divnix/devos/issues/294) 17 - - default.nix flake-compat is broken [\#285](https://github.com/divnix/devos/issues/285) 18 - - All suites return "attribute missing" [\#282](https://github.com/divnix/devos/issues/282) 19 - - nix is built two times [\#203](https://github.com/divnix/devos/issues/203) 20 - - fix lib docs [\#166](https://github.com/divnix/devos/issues/166) 21 - 22 - **Closed issues:** 23 - 24 - - eliminate userFlakeNixOS [\#257](https://github.com/divnix/devos/issues/257) 25 - - devos-as-library [\#214](https://github.com/divnix/devos/issues/214) 26 - 27 - **Merged pull requests:** 28 - 29 - - Update evalArgs to match the new planned API [\#239](https://github.com/divnix/devos/pull/239) 30 - 31 - ## [v0.9.0](https://github.com/divnix/devos/tree/v0.9.0) (2021-04-19) 32 - 33 - **Implemented enhancements:** 34 - 35 - - pin inputs into iso live registry [\#190](https://github.com/divnix/devos/issues/190) 36 - - Pass 'self' to lib [\#169](https://github.com/divnix/devos/issues/169) 37 - - doc: quickstart "ISO. What next?" [\#167](https://github.com/divnix/devos/issues/167) 38 - - Integrate Android AOSP putting mobile under control [\#149](https://github.com/divnix/devos/issues/149) 39 - - Inoculate host identity on first use [\#132](https://github.com/divnix/devos/issues/132) 40 - - kubenix support [\#130](https://github.com/divnix/devos/issues/130) 41 - - Improve Home Manager support: profiles/suites, modules, extern, flake outputs [\#119](https://github.com/divnix/devos/issues/119) 42 - - Local CA \(between hosts\) [\#104](https://github.com/divnix/devos/issues/104) 43 - - Q5: git annex for machine state [\#68](https://github.com/divnix/devos/issues/68) 44 - - name space ./pkgs overlays [\#60](https://github.com/divnix/devos/issues/60) 45 - - remap global keys easily [\#57](https://github.com/divnix/devos/issues/57) 46 - - make pass state part of this repo's structure [\#56](https://github.com/divnix/devos/issues/56) 47 - - Incorporate ./shells [\#38](https://github.com/divnix/devos/issues/38) 48 - - Encrypt with \(r\)age [\#37](https://github.com/divnix/devos/issues/37) 49 - 50 - **Fixed bugs:** 51 - 52 - - `pathsToImportedAttrs` does not accept directories [\#221](https://github.com/divnix/devos/issues/221) 53 - - Cachix caches aren't added to the configuration [\#208](https://github.com/divnix/devos/issues/208) 54 - - Issues with current changelog workflow [\#205](https://github.com/divnix/devos/issues/205) 55 - - iso: systemd service startup [\#194](https://github.com/divnix/devos/issues/194) 56 - - Help adding easy-hls-nix to devos [\#174](https://github.com/divnix/devos/issues/174) 57 - - `flk update` fails because of obsolete flag [\#159](https://github.com/divnix/devos/issues/159) 58 - - Expected that not all packages are exported? [\#151](https://github.com/divnix/devos/issues/151) 59 - - Segmentation fault when generating iso [\#150](https://github.com/divnix/devos/issues/150) 60 - 61 - **Documentation:** 62 - 63 - - doc: split iso [\#193](https://github.com/divnix/devos/issues/193) 64 - - lib: can depend on pkgs \(a la nixpkgs\#pkgs/pkgs-lib\) [\#147](https://github.com/divnix/devos/pull/147) 65 - 66 - **Closed issues:** 67 - 68 - - FRRouting router implementation [\#154](https://github.com/divnix/devos/issues/154) 69 - - ARM aarch64 Support [\#72](https://github.com/divnix/devos/issues/72) 70 - 71 - ## [v0.8.0](https://github.com/divnix/devos/tree/v0.8.0) (2021-03-02) 72 - 73 - **Implemented enhancements:** 74 - 75 - - semi automatic update for /pkgs [\#118](https://github.com/divnix/devos/issues/118) 76 - - Home-manager external modules from flakes [\#106](https://github.com/divnix/devos/issues/106) 77 - 78 - **Fixed bugs:** 79 - 80 - - My emacsGcc overlay is not working [\#146](https://github.com/divnix/devos/issues/146) 81 - - local flake registry freezes branches [\#142](https://github.com/divnix/devos/issues/142) 82 - - nixos-option no longer works after collect garbage [\#138](https://github.com/divnix/devos/issues/138) 83 - - Profiles imports are brittle, causing failure if imported twice [\#136](https://github.com/divnix/devos/issues/136) 84 - 85 - ## [0.7.0](https://github.com/divnix/devos/tree/0.7.0) (2021-02-20) 86 - 87 - **Implemented enhancements:** 88 - 89 - - add zoxide [\#53](https://github.com/divnix/devos/issues/53) 90 - - Multiarch support? [\#17](https://github.com/divnix/devos/issues/17) 91 - - initial multiArch support [\#18](https://github.com/divnix/devos/pull/18) 92 - 93 - **Fixed bugs:** 94 - 95 - - Missing shebang from flk.sh [\#131](https://github.com/divnix/devos/issues/131) 96 - - Rename Meta Issue [\#128](https://github.com/divnix/devos/issues/128) 97 - - specialisations break the `system` argument [\#46](https://github.com/divnix/devos/issues/46) 98 - - Revert "Add extraArgs to lib.nixosSystem call to add system args." [\#47](https://github.com/divnix/devos/pull/47) 99 - 100 - **Documentation:** 101 - 102 - - update home-manager urls [\#62](https://github.com/divnix/devos/pull/62) 103 - 104 - **Closed issues:** 105 - 106 - - add github action for cachix build ci [\#59](https://github.com/divnix/devos/issues/59) 107 - 108 - ## [12052020](https://github.com/divnix/devos/tree/12052020) (2020-12-06) 109 - 110 - ## [07092020](https://github.com/divnix/devos/tree/07092020) (2020-07-09) 111 - 112 - 113 - 114 - \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
+21 -395
flake.lock
··· 1 1 { 2 2 "nodes": { 3 - "alejandra": { 4 - "inputs": { 5 - "flakeCompat": "flakeCompat", 6 - "nixpkgs": [ 7 - "nixos" 8 - ] 9 - }, 10 - "locked": { 11 - "lastModified": 1649191071, 12 - "narHash": "sha256-35hEJuMvRswOPKb9lbB9ZuHVe0eJN6WJc4T8Frn0hYQ=", 13 - "owner": "kamadorueda", 14 - "repo": "alejandra", 15 - "rev": "3d3f24127a8e2b28998a81c444f8b4b4f11da6c6", 16 - "type": "github" 17 - }, 18 - "original": { 19 - "owner": "kamadorueda", 20 - "repo": "alejandra", 21 - "type": "github" 22 - } 23 - }, 24 - "cachix": { 25 - "locked": { 26 - "lastModified": 1642244250, 27 - "narHash": "sha256-vWpUEqQdVP4srj+/YLJRTN9vjpTs4je0cdWKXPbDItc=", 28 - "owner": "nixos", 29 - "repo": "nixpkgs", 30 - "rev": "0fd9ee1aa36ce865ad273f4f07fdc093adeb5c00", 31 - "type": "github" 32 - }, 33 - "original": { 34 - "owner": "nixos", 35 - "ref": "nixos-21.05", 36 - "repo": "nixpkgs", 37 - "type": "github" 38 - } 39 - }, 40 - "crane": { 41 - "flake": false, 42 - "locked": { 43 - "lastModified": 1644785799, 44 - "narHash": "sha256-VpAJO1L0XeBvtCuNGK4IDKp6ENHIpTrlaZT7yfBCvwo=", 45 - "owner": "ipetkov", 46 - "repo": "crane", 47 - "rev": "fc7a94f841347c88f2cb44217b2a3faa93e2a0b2", 48 - "type": "github" 49 - }, 50 - "original": { 51 - "owner": "ipetkov", 52 - "repo": "crane", 53 - "type": "github" 54 - } 55 - }, 56 - "devshell": { 57 - "inputs": { 58 - "flake-utils": "flake-utils_2", 59 - "nixpkgs": [ 60 - "nixCargoIntegration", 61 - "nixpkgs" 62 - ] 63 - }, 64 - "locked": { 65 - "lastModified": 1647857022, 66 - "narHash": "sha256-Aw70NWLOIwKhT60MHDGjgWis3DP3faCzr6ap9CSayek=", 67 - "owner": "numtide", 68 - "repo": "devshell", 69 - "rev": "0a5ff74dacb9ea22614f64e61aeb3ca0bf0e7311", 70 - "type": "github" 71 - }, 72 - "original": { 73 - "owner": "numtide", 74 - "repo": "devshell", 75 - "type": "github" 76 - } 77 - }, 78 - "dream2nix": { 79 - "inputs": { 80 - "alejandra": [ 81 - "nixCargoIntegration", 82 - "nixpkgs" 83 - ], 84 - "crane": "crane", 85 - "flake-utils-pre-commit": [ 86 - "nixCargoIntegration", 87 - "nixpkgs" 88 - ], 89 - "gomod2nix": [ 90 - "nixCargoIntegration", 91 - "nixpkgs" 92 - ], 93 - "mach-nix": [ 94 - "nixCargoIntegration", 95 - "nixpkgs" 96 - ], 97 - "nixpkgs": [ 98 - "nixCargoIntegration", 99 - "nixpkgs" 100 - ], 101 - "node2nix": [ 102 - "nixCargoIntegration", 103 - "nixpkgs" 104 - ], 105 - "poetry2nix": [ 106 - "nixCargoIntegration", 107 - "nixpkgs" 108 - ], 109 - "pre-commit-hooks": [ 110 - "nixCargoIntegration", 111 - "nixpkgs" 112 - ] 113 - }, 114 - "locked": { 115 - "lastModified": 1649088506, 116 - "narHash": "sha256-rIpLWnomSDYlaZfQiXs4Ui3EqmiY6d9qEkIY/vzZg6s=", 117 - "owner": "nix-community", 118 - "repo": "dream2nix", 119 - "rev": "84135ea205bcc04648fcc7776261e1dcb6e78ceb", 120 - "type": "github" 121 - }, 122 - "original": { 123 - "owner": "nix-community", 124 - "repo": "dream2nix", 125 - "type": "github" 126 - } 127 - }, 128 - "flake-compat": { 129 - "flake": false, 130 - "locked": { 131 - "lastModified": 1641205782, 132 - "narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=", 133 - "owner": "edolstra", 134 - "repo": "flake-compat", 135 - "rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7", 136 - "type": "github" 137 - }, 138 - "original": { 139 - "owner": "edolstra", 140 - "repo": "flake-compat", 141 - "type": "github" 142 - } 143 - }, 144 - "flake-utils": { 145 - "locked": { 146 - "lastModified": 1644229661, 147 - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", 148 - "owner": "numtide", 149 - "repo": "flake-utils", 150 - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", 151 - "type": "github" 152 - }, 153 - "original": { 154 - "owner": "numtide", 155 - "repo": "flake-utils", 156 - "type": "github" 157 - } 158 - }, 159 - "flake-utils_2": { 160 - "locked": { 161 - "lastModified": 1642700792, 162 - "narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=", 163 - "owner": "numtide", 164 - "repo": "flake-utils", 165 - "rev": "846b2ae0fc4cc943637d3d1def4454213e203cba", 166 - "type": "github" 167 - }, 168 - "original": { 169 - "owner": "numtide", 170 - "repo": "flake-utils", 171 - "type": "github" 172 - } 173 - }, 174 - "flake-utils_3": { 175 - "locked": { 176 - "lastModified": 1637014545, 177 - "narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=", 178 - "owner": "numtide", 179 - "repo": "flake-utils", 180 - "rev": "bba5dcc8e0b20ab664967ad83d24d64cb64ec4f4", 181 - "type": "github" 182 - }, 183 - "original": { 184 - "owner": "numtide", 185 - "repo": "flake-utils", 186 - "type": "github" 187 - } 188 - }, 189 - "flakeCompat": { 190 - "flake": false, 191 - "locked": { 192 - "lastModified": 1648199409, 193 - "narHash": "sha256-JwPKdC2PoVBkG6E+eWw3j6BMR6sL3COpYWfif7RVb8Y=", 194 - "owner": "edolstra", 195 - "repo": "flake-compat", 196 - "rev": "64a525ee38886ab9028e6f61790de0832aa3ef03", 197 - "type": "github" 198 - }, 199 - "original": { 200 - "owner": "edolstra", 201 - "repo": "flake-compat", 202 - "type": "github" 203 - } 204 - }, 205 - "fup": { 206 - "inputs": { 207 - "flake-utils": "flake-utils" 208 - }, 209 - "locked": { 210 - "lastModified": 1647259887, 211 - "narHash": "sha256-yEkMbEHVO9qydluQ3uHGWX1PkfZhgDKxnd1rhZYZ72w=", 212 - "owner": "gytis-ivaskevicius", 213 - "repo": "flake-utils-plus", 214 - "rev": "06dba5f3b4fa2cc0bfc98ce9cd6f9a4d8db11d46", 215 - "type": "github" 216 - }, 217 - "original": { 218 - "owner": "gytis-ivaskevicius", 219 - "repo": "flake-utils-plus", 220 - "type": "github" 221 - } 222 - }, 223 - "helix": { 224 - "inputs": { 225 - "nixCargoIntegration": [ 226 - "nixCargoIntegration" 227 - ], 228 - "nixpkgs": [ 229 - "nixos" 230 - ], 231 - "rust-overlay": [ 232 - "rust-overlay" 233 - ] 234 - }, 235 - "locked": { 236 - "lastModified": 1649456512, 237 - "narHash": "sha256-evrtUI3NkwEhQGJmRPnDqvoYex3SnH9NAxgCLJw2v3s=", 238 - "owner": "helix-editor", 239 - "repo": "helix", 240 - "rev": "7779dbfcb847e9aa20e01ae0f8354c3c0de38fe3", 241 - "type": "github" 242 - }, 243 - "original": { 244 - "owner": "helix-editor", 245 - "repo": "helix", 246 - "type": "github" 247 - } 248 - }, 249 3 "home": { 250 4 "inputs": { 251 5 "nixpkgs": [ ··· 267 21 "type": "github" 268 22 } 269 23 }, 270 - "naersk": { 271 - "inputs": { 272 - "nixpkgs": [ 273 - "nixos" 274 - ] 275 - }, 276 - "locked": { 277 - "lastModified": 1649096192, 278 - "narHash": "sha256-7O8e+eZEYeU+ET98u/zW5epuoN/xYx9G+CIh4DjZVzY=", 279 - "owner": "nmattia", 280 - "repo": "naersk", 281 - "rev": "d626f73332a8f587b613b0afe7293dd0777be07d", 282 - "type": "github" 283 - }, 284 - "original": { 285 - "owner": "nmattia", 286 - "repo": "naersk", 287 - "type": "github" 288 - } 289 - }, 290 - "nixCargoIntegration": { 291 - "inputs": { 292 - "devshell": "devshell", 293 - "dream2nix": "dream2nix", 294 - "nixpkgs": [ 295 - "nixos" 296 - ], 297 - "rustOverlay": [ 298 - "rust-overlay" 299 - ] 300 - }, 24 + "latest": { 301 25 "locked": { 302 - "lastModified": 1649398335, 303 - "narHash": "sha256-SjE4w4kcg3NphapPwBMiIdZDLvVqEf9+IfIskQMd4OY=", 304 - "owner": "yusdacra", 305 - "repo": "nix-cargo-integration", 306 - "rev": "791bf70e720869431479bd4f2133e466b13fe088", 26 + "lastModified": 1649225869, 27 + "narHash": "sha256-u1zLtPmQzhT9mNXyM8Ey9pk7orDrIKdwooeGDEXm5xM=", 28 + "owner": "nixos", 29 + "repo": "nixpkgs", 30 + "rev": "b6966d911da89e5a7301aaef8b4f0a44c77e103c", 307 31 "type": "github" 308 32 }, 309 33 "original": { 310 - "owner": "yusdacra", 311 - "repo": "nix-cargo-integration", 34 + "owner": "nixos", 35 + "ref": "nixos-unstable", 36 + "repo": "nixpkgs", 312 37 "type": "github" 313 38 } 314 39 }, 315 40 "nixos": { 316 41 "locked": { 317 - "lastModified": 1649225869, 318 - "narHash": "sha256-u1zLtPmQzhT9mNXyM8Ey9pk7orDrIKdwooeGDEXm5xM=", 42 + "lastModified": 1649504202, 43 + "narHash": "sha256-k7BZoTGeNqz+jy0v0kKl3jSa+6Q4Dx1FPpZFF9+u9nA=", 319 44 "owner": "nixos", 320 45 "repo": "nixpkgs", 321 - "rev": "b6966d911da89e5a7301aaef8b4f0a44c77e103c", 46 + "rev": "27b0c3988745d1b18607744badaf2add79c8bcea", 322 47 "type": "github" 323 48 }, 324 49 "original": { 325 50 "owner": "nixos", 326 - "ref": "nixos-unstable", 51 + "ref": "release-21.11", 327 52 "repo": "nixpkgs", 328 53 "type": "github" 329 54 } 330 55 }, 331 - "nixosHardware": { 56 + "nixos-hardware": { 332 57 "locked": { 333 - "lastModified": 1649401245, 334 - "narHash": "sha256-mce0dpugKD9qgFgzloE2yoYJRD6Bvsy2QDzODpXMsss=", 58 + "lastModified": 1649488242, 59 + "narHash": "sha256-GFahTvlMnqotZ8i1AO3J8OtVFrJe4QHcEPxpFH+DIEw=", 335 60 "owner": "nixos", 336 61 "repo": "nixos-hardware", 337 - "rev": "ddeb6a0aa430914674d6f0bc1646cf11e799a5bb", 62 + "rev": "850308db3ef0bcc7454155063b5fec28b4ffbc8c", 338 63 "type": "github" 339 64 }, 340 65 "original": { ··· 343 68 "type": "github" 344 69 } 345 70 }, 346 - "nixosPersistence": { 71 + "nixos-persistence": { 347 72 "locked": { 348 73 "lastModified": 1646131459, 349 74 "narHash": "sha256-GPmgxvUFvQ1GmsGfWHy9+rcxWrczeDhS9XnAIPHi9XQ=", ··· 358 83 "type": "github" 359 84 } 360 85 }, 361 - "nixpkgs": { 362 - "locked": { 363 - "lastModified": 1645433236, 364 - "narHash": "sha256-4va4MvJ076XyPp5h8sm5eMQvCrJ6yZAbBmyw95dGyw4=", 365 - "owner": "nixos", 366 - "repo": "nixpkgs", 367 - "rev": "7f9b6e2babf232412682c09e57ed666d8f84ac2d", 368 - "type": "github" 369 - }, 370 - "original": { 371 - "owner": "nixos", 372 - "ref": "nixos-unstable", 373 - "repo": "nixpkgs", 374 - "type": "github" 375 - } 376 - }, 377 - "nixpkgsWayland": { 378 - "inputs": { 379 - "cachix": "cachix", 380 - "flake-compat": "flake-compat", 381 - "nixpkgs": "nixpkgs" 382 - }, 383 - "locked": { 384 - "narHash": "sha256-xwi46ruR5z4THe967gzW74dQhPmlS5FWSiWuo9aYquY=", 385 - "path": "/nix/store/23by5yfsvzynznfjk2kjwn1gpb231fl9-source", 386 - "type": "path" 387 - }, 388 - "original": { 389 - "id": "nixpkgsWayland", 390 - "type": "indirect" 391 - } 392 - }, 393 - "rnixLsp": { 394 - "inputs": { 395 - "naersk": [ 396 - "naersk" 397 - ], 398 - "nixpkgs": [ 399 - "nixos" 400 - ], 401 - "utils": "utils" 402 - }, 403 - "locked": { 404 - "lastModified": 1647240246, 405 - "narHash": "sha256-/MLdBWfFUN1C1eNVBYfaVAIcDiZKXpWEbzBC2pqVXj0=", 406 - "owner": "nix-community", 407 - "repo": "rnix-lsp", 408 - "rev": "4d1024ccfe1bc569811769d1ef52a2fc6c1d482d", 409 - "type": "github" 410 - }, 411 - "original": { 412 - "owner": "nix-community", 413 - "repo": "rnix-lsp", 414 - "type": "github" 415 - } 416 - }, 417 86 "root": { 418 87 "inputs": { 419 - "alejandra": "alejandra", 420 - "fup": "fup", 421 - "helix": "helix", 422 88 "home": "home", 423 - "naersk": "naersk", 424 - "nixCargoIntegration": "nixCargoIntegration", 89 + "latest": "latest", 425 90 "nixos": "nixos", 426 - "nixosHardware": "nixosHardware", 427 - "nixosPersistence": "nixosPersistence", 428 - "nixpkgsWayland": "nixpkgsWayland", 429 - "rnixLsp": "rnixLsp", 430 - "rust-overlay": "rust-overlay" 431 - } 432 - }, 433 - "rust-overlay": { 434 - "inputs": { 435 - "flake-utils": "flake-utils_3", 436 - "nixpkgs": [ 437 - "nixos" 438 - ] 439 - }, 440 - "locked": { 441 - "lastModified": 1649447403, 442 - "narHash": "sha256-JZMYKsCxpLpPKLVjDUVmKs/bVnbcaPa8crf2uKh0lKY=", 443 - "owner": "oxalica", 444 - "repo": "rust-overlay", 445 - "rev": "44801306a2aa0e9aaa47588d615ce6df4acf18c6", 446 - "type": "github" 447 - }, 448 - "original": { 449 - "owner": "oxalica", 450 - "repo": "rust-overlay", 451 - "type": "github" 452 - } 453 - }, 454 - "utils": { 455 - "locked": { 456 - "lastModified": 1638122382, 457 - "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", 458 - "owner": "numtide", 459 - "repo": "flake-utils", 460 - "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", 461 - "type": "github" 462 - }, 463 - "original": { 464 - "owner": "numtide", 465 - "repo": "flake-utils", 466 - "type": "github" 91 + "nixos-hardware": "nixos-hardware", 92 + "nixos-persistence": "nixos-persistence" 467 93 } 468 94 } 469 95 },
+20 -115
flake.nix
··· 1 1 { 2 - description = "A highly structured configuration database."; 2 + description = "config!!!"; 3 + 3 4 inputs = { 4 - nixos.url = "github:nixos/nixpkgs/nixos-unstable"; 5 - 6 - fup.url = "github:gytis-ivaskevicius/flake-utils-plus"; 5 + nixos.url = "github:nixos/nixpkgs/release-21.11"; 6 + latest.url = "github:nixos/nixpkgs/nixos-unstable"; 7 7 8 8 home.url = "github:nix-community/home-manager/release-21.11"; 9 9 home.inputs.nixpkgs.follows = "nixos"; 10 10 11 - rust-overlay = { 12 - url = "github:oxalica/rust-overlay"; 13 - inputs.nixpkgs.follows = "nixos"; 14 - }; 15 - naersk.url = "github:nmattia/naersk"; 16 - naersk.inputs.nixpkgs.follows = "nixos"; 17 - nixCargoIntegration.url = "github:yusdacra/nix-cargo-integration"; 18 - nixCargoIntegration.inputs.nixpkgs.follows = "nixos"; 19 - nixCargoIntegration.inputs.rustOverlay.follows = "rust-overlay"; 20 - 21 - nixosHardware.url = "github:nixos/nixos-hardware"; 22 - nixosPersistence.url = "github:nix-community/impermanence"; 23 - 24 - rnixLsp = { 25 - url = "github:nix-community/rnix-lsp"; 26 - inputs.naersk.follows = "naersk"; 27 - inputs.nixpkgs.follows = "nixos"; 28 - }; 29 - alejandra = { 30 - url = "github:kamadorueda/alejandra"; 31 - inputs.nixpkgs.follows = "nixos"; 32 - }; 33 - helix = { 34 - url = "github:helix-editor/helix"; 35 - inputs.nixpkgs.follows = "nixos"; 36 - inputs.rust-overlay.follows = "rust-overlay"; 37 - inputs.nixCargoIntegration.follows = "nixCargoIntegration"; 38 - }; 11 + nixos-hardware.url = "github:nixos/nixos-hardware"; 12 + nixos-persistence.url = "github:nix-community/impermanence"; 39 13 }; 40 - outputs = { 41 - self, 42 - fup, 43 - home, 44 - nixosHardware, 45 - nixosPersistence, 46 - nixpkgsWayland, 47 - rnixLsp, 48 - alejandra, 49 - helix, 50 - nixos, 51 - ... 52 - } @ inputs: 53 - fup.lib.mkFlake 54 - { 55 - inherit self inputs; 56 14 57 - supportedSystems = ["x86_64-linux"]; 58 - channelsConfig.allowUnfree = true; 59 - nix.generateRegistryFromInputs = true; 60 - nix.generateNixPathFromInputs = true; 61 - nix.linkInputs = true; 62 - 63 - sharedOverlays = [ 64 - (_: prev: { 65 - lib = prev.lib.extend (_: _: builtins); 66 - }) 67 - (_: prev: { 68 - lib = prev.lib.extend (_: l: { 69 - pkgBin = id: 70 - if l.isString id 71 - then "${prev.${id}}/bin/${id}" 72 - else "${prev.${id.name}}/bin/${id.bin}"; 73 - }); 74 - }) 75 - ]; 76 - 77 - channels.nixos = { 78 - overlays = [ 79 - ./overlays/chromium-wayland.nix 80 - ./overlays/phantom.nix 81 - ( 82 - _: prev: { 83 - helix = helix.packages.${prev.system}.helix; 84 - rnix-lsp = rnixLsp.packages.${prev.system}.rnix-lsp; 85 - alejandra = alejandra.defaultPackage.${prev.system}; 86 - } 87 - ) 88 - ]; 89 - }; 90 - 91 - hostDefaults = { 92 - channelName = "nixos"; 93 - modules = [ 94 - home.nixosModules.home-manager 95 - ./profiles 96 - ./modules 97 - ./locale 98 - ./secrets 99 - ]; 100 - }; 101 - 102 - hosts.lungmen = { 103 - modules = with nixosHardware.nixosModules; [ 104 - nixos.nixosModules.notDetected 105 - nixosPersistence.nixosModules.impermanence 106 - common-pc-ssd 107 - common-pc 108 - common-gpu-amd 109 - common-cpu-amd 110 - ./profiles/network/networkmanager 111 - ./users/root 112 - ./users/patriot 113 - ./hosts/lungmen 114 - ]; 115 - }; 116 - 117 - outputsBuilder = channels: 118 - with channels.nixos; { 119 - devShell = mkShell { 120 - name = "prts"; 121 - buildInputs = [git git-crypt]; 122 - }; 15 + outputs = inputs: let 16 + lib = (import ./lib inputs.nixos.lib).extend (_: lib: rec { 17 + makePkgs = system: 18 + import ./pkgs-set { 19 + inherit system lib; 20 + stable = inputs.nixos; 21 + unstable = inputs.latest; 123 22 }; 124 - }; 23 + genPkgs = f: lib.genSystems (system: f (makePkgs system)); 24 + }); 25 + in rec { 26 + nixosConfigurations = import ./hosts {inherit lib inputs;}; 27 + devShells = import ./shells {inherit lib inputs;}; 28 + devShell = lib.mapAttrs (_: value: value.default) devShells; 29 + }; 125 30 }
+22
hosts/default.nix
··· 1 + { 2 + inputs, 3 + lib, 4 + }: let 5 + baseModules = [ 6 + ../modules 7 + ../secrets 8 + ../locale 9 + inputs.home.nixosModule 10 + ]; 11 + 12 + mkSystem = name: system: let 13 + pkgs = lib.makePkgs system; 14 + in 15 + lib.nixosSystem { 16 + inherit system; 17 + modules = baseModules ++ [(import (./. + "/${name}/default.nix"))]; 18 + specialArgs = {inherit inputs lib pkgs;}; 19 + }; 20 + in { 21 + lungmen = mkSystem "lungmen" "x86_64-linux"; 22 + }
+42 -43
hosts/lungmen/default.nix
··· 2 2 config, 3 3 lib, 4 4 pkgs, 5 - modulesPath, 5 + inputs, 6 6 ... 7 7 }: let 8 8 btrfsPartPath = "/dev/disk/by-label/NIXOS"; ··· 38 38 sudo umount /mnt 39 39 ''; 40 40 in { 41 + imports = with inputs; 42 + with nixos-hardware.nixosModules; [ 43 + nixos.nixosModules.notDetected 44 + nixos-persistence.nixosModule 45 + common-pc-ssd 46 + common-pc 47 + common-gpu-amd 48 + common-cpu-amd 49 + ../../modules/network/dns 50 + ../../users/root 51 + ../../users/patriot 52 + ]; 53 + 41 54 boot = { 55 + tmpOnTmpfs = true; 42 56 loader = { 43 57 efi.canTouchEfiVariables = true; 44 58 systemd-boot.enable = true; 59 + systemd-boot.configurationLimit = 10; 45 60 }; 46 61 kernelPackages = pkgs.linuxPackages_latest; 47 62 supportedFilesystems = ["btrfs"]; ··· 70 85 ''; 71 86 kernel.sysctl = {"fs.inotify.max_user_watches" = 524288;}; 72 87 }; 73 - security.pam.loginLimits = [ 74 - { 75 - domain = "*"; 76 - type = "soft"; 77 - item = "nofile"; 78 - value = "524288"; 79 - } 80 - { 81 - domain = "*"; 82 - type = "hard"; 83 - item = "nofile"; 84 - value = "524288"; 85 - } 86 - ]; 88 + 87 89 fileSystems."/" = { 88 90 device = btrfsPartPath; 89 91 fsType = "btrfs"; ··· 114 116 device = "/dev/disk/by-uuid/5784-BBB1"; 115 117 fsType = "vfat"; 116 118 }; 119 + 117 120 swapDevices = []; 118 121 zramSwap = { 119 122 enable = true; 120 123 algorithm = "zstd"; 121 124 }; 122 - nix.settings.max-jobs = lib.mkDefault 4; 125 + 126 + nix.maxJobs = lib.mkDefault 4; 123 127 security = { 128 + pam.loginLimits = [ 129 + { 130 + domain = "*"; 131 + type = "soft"; 132 + item = "nofile"; 133 + value = "524288"; 134 + } 135 + { 136 + domain = "*"; 137 + type = "hard"; 138 + item = "nofile"; 139 + value = "524288"; 140 + } 141 + ]; 124 142 allowSimultaneousMultithreading = false; 125 143 # Deleting root subvolume makes sudo show lecture every boot 126 144 sudo.extraConfig = '' ··· 128 146 ''; 129 147 rtkit.enable = true; 130 148 }; 149 + 131 150 sound.enable = false; 132 151 services.pipewire = { 133 152 enable = true; ··· 149 168 support32Bit = true; 150 169 }; 151 170 }; 171 + 152 172 fonts = { 153 173 enableDefaultFonts = true; 154 174 fontconfig.enable = true; 155 175 fonts = [pkgs.dejavu_fonts]; 156 176 }; 177 + 157 178 environment = { 158 179 systemPackages = [btrfsDiff]; 159 180 pathsToLink = ["/share/zsh"]; ··· 172 193 "${pkgs.amdvlk}/share/vulkan/icd.d/amd_icd64.json:${pkgs.driversi686Linux.amdvlk}/share/vulkan/icd.d/amd_icd32.json"; 173 194 }; 174 195 }; 196 + 175 197 networking.interfaces.enp6s0.useDHCP = true; 176 198 services = { 177 - code-server = { 178 - enable = false; 179 - auth = "none"; 180 - user = "patriot"; 181 - group = "users"; 182 - }; 199 + earlyoom.enable = true; 183 200 ipfs = { 184 201 enable = false; 185 202 enableGC = true; 186 203 autoMount = true; 187 204 }; 188 205 flatpak.enable = false; 189 - xserver = {videoDrivers = ["amdgpu"];}; 190 - postgresql = { 191 - enable = false; 192 - enableTCPIP = true; 193 - authentication = 194 - lib.mkOverride 195 - 10 196 - '' 197 - local all all trust 198 - host all all 0.0.0.0/0 md5 199 - ''; 200 - settings = {listen_addresses = "*";}; 201 - initialScript = 202 - pkgs.writeText 203 - "backend-initScript" 204 - '' 205 - CREATE ROLE patriot WITH LOGIN PASSWORD 'patriot' CREATEDB; 206 - CREATE DATABASE harmony; 207 - GRANT ALL PRIVILEGES ON DATABASE harmony TO patriot; 208 - ''; 209 - }; 206 + xserver.videoDrivers = ["amdgpu"]; 210 207 }; 208 + 211 209 virtualisation = { 212 210 podman.enable = true; 213 211 libvirtd.enable = false; 214 212 }; 213 + 215 214 system.stateVersion = "20.09"; 216 215 }
+10
lib/default.nix
··· 1 + lib: 2 + (lib.extend (_: _: builtins)).extend (_: lib: rec { 3 + defaultSystems = import ./systems.nix; 4 + genSystems = lib.genAttrs defaultSystems; 5 + 6 + pkgBin = pkgs: id: 7 + if lib.isString id 8 + then "${pkgs.${id}}/bin/${id}" 9 + else "${pkgs.${id.name}}/bin/${id.bin}"; 10 + })
+1
lib/systems.nix
··· 1 + ["x86_64-linux"]
+23
modules/base/nix.nix
··· 1 + { 2 + pkgs, 3 + lib, 4 + inputs, 5 + ... 6 + }: { 7 + nix = { 8 + registry = builtins.mapAttrs (_: v: {flake = v;}) (lib.filterAttrs (_: v: v ? outputs) inputs); 9 + package = pkgs.nixUnstable; 10 + gc.automatic = true; 11 + optimise.automatic = true; 12 + extraOptions = '' 13 + min-free = 536870912 14 + keep-outputs = true 15 + keep-derivations = true 16 + fallback = true 17 + ''; 18 + useSandbox = true; 19 + allowedUsers = ["@wheel"]; 20 + trustedUsers = ["root" "@wheel"]; 21 + autoOptimiseStore = true; 22 + }; 23 + }
+3 -1
modules/default.nix
··· 1 1 { 2 2 imports = [ 3 - ./hm-system-defaults.nix 3 + ./base 4 + ./develop 5 + ./cachix 4 6 ]; 5 7 }
+1
modules/hm-system-defaults.nix modules/base/hm-system-defaults.nix
··· 1 1 {config, ...}: { 2 + home-manager.useGlobalPkgs = true; 2 3 home-manager.sharedModules = [ 3 4 { 4 5 home.sessionVariables = {inherit (config.environment.sessionVariables) NIX_PATH;};
overlays/chromium-wayland.nix pkgs-set/overlays/chromium-wayland.nix
overlays/discord-canary-system.nix pkgs-set/overlays/discord-canary-system.nix
overlays/discord-canary.nix pkgs-set/overlays/discord-canary.nix
overlays/phantom.nix pkgs-set/overlays/phantom.nix
overlays/vscode-wayland.nix pkgs-set/overlays/vscode-wayland.nix
+19
pkgs-set/default.nix
··· 1 + { 2 + stable, 3 + unstable, 4 + system, 5 + lib, 6 + }: let 7 + overlays = 8 + lib.mapAttrsToList 9 + (name: _: import "${./overlays}/${name}") 10 + (lib.readDir ./overlays); 11 + unstablePkgs = import unstable { 12 + inherit system; 13 + }; 14 + pkgs = import stable { 15 + inherit system; 16 + overlays = [(_: _: import ./from-unstable.nix unstablePkgs)] ++ overlays; 17 + }; 18 + in 19 + pkgs
+9
pkgs-set/from-unstable.nix
··· 1 + pkgs: { 2 + inherit 3 + (pkgs) 4 + helix 5 + alejandra 6 + rnix-lsp 7 + chromium 8 + ; 9 + }
+1 -1
profiles/cachix/default.nix modules/cachix/default.nix
··· 9 9 imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder)); 10 10 in { 11 11 #inherit imports; 12 - nix.settings.substituters = ["https://cache.nixos.org/"]; 12 + nix.binaryCaches = ["https://cache.nixos.org/"]; 13 13 }
profiles/cachix/harmony.nix modules/cachix/harmony.nix
profiles/cachix/nix-cargo-integration.nix modules/cachix/nix-cargo-integration.nix
profiles/cachix/nix-community.nix modules/cachix/nix-community.nix
profiles/cachix/nixpkgs-wayland.nix modules/cachix/nixpkgs-wayland.nix
profiles/cachix/nrdxp.nix modules/cachix/nrdxp.nix
profiles/cachix/veloren-nix.nix modules/cachix/veloren-nix.nix
+8 -39
profiles/default.nix modules/base/default.nix
··· 2 2 inputs, 3 3 config, 4 4 pkgs, 5 + lib, 5 6 ... 6 7 }: let 7 - inherit (pkgs) lib; 8 8 inherit (lib) fileContents mkIf pkgBin; 9 + 9 10 coreBin = v: "${pkgs.coreutils}/bin/${v}"; 10 11 nixBin = "${config.nix.package}/bin/nix"; 11 12 in { 12 - imports = [./cachix]; 13 - boot = { 14 - tmpOnTmpfs = true; 15 - loader.systemd-boot.configurationLimit = 10; 16 - }; 13 + imports = [ 14 + ./nix.nix 15 + ./hm-system-defaults.nix 16 + ]; 17 + 17 18 console.font = "7x14"; 18 19 environment = { 19 20 systemPackages = with pkgs; [ ··· 139 140 --experimental-features 'nix-command' \ 140 141 diff-closures /run/current-system "$systemConfig" 141 142 ''; 142 - nix = let 143 - registry = 144 - builtins.removeAttrs 145 - (builtins.mapAttrs (_: v: {flake = v;}) (lib.filterAttrs (_: v: v ? outputs) inputs)) 146 - ["bud"]; 147 - in { 148 - package = pkgs.nixUnstable; 149 - gc.automatic = true; 150 - optimise.automatic = true; 151 - extraOptions = '' 152 - min-free = 536870912 153 - keep-outputs = true 154 - keep-derivations = true 155 - fallback = true 156 - ''; 157 - inherit registry; 158 - settings = { 159 - sandbox = true; 160 - allowed-users = ["@wheel"]; 161 - trusted-users = ["root" "@wheel"]; 162 - auto-optimise-store = true; 163 - }; 164 - }; 143 + users.mutableUsers = false; 165 144 programs.command-not-found.enable = false; 166 - home-manager.useGlobalPkgs = true; 167 - users.mutableUsers = false; 168 - # For rage encryption, all hosts need a ssh key pair 169 - /* 170 - services.openssh = { 171 - enable = true; 172 - openFirewall = lib.mkDefault false; 173 - }; 174 - */ 175 - services.earlyoom.enable = true; 176 145 }
profiles/develop/default.nix modules/develop/default.nix
profiles/develop/editor/default.nix modules/develop/editor/default.nix
profiles/develop/editor/helix.nix modules/develop/editor/helix.nix
profiles/develop/editor/kakoune.nix modules/develop/editor/kakoune.nix
profiles/develop/godot.nix modules/develop/godot.nix
profiles/network/default.nix modules/network/default.nix
profiles/network/dns/default.nix modules/network/dns/default.nix
profiles/network/dns/nextdns.nix modules/network/dns/nextdns.nix
profiles/network/dns/stubby/default.nix modules/network/dns/stubby/default.nix
profiles/network/dns/stubby/nextdns.nix modules/network/dns/stubby/nextdns.nix
profiles/network/iwd.nix modules/network/iwd.nix
profiles/network/networkmanager/default.nix modules/network/networkmanager/default.nix
profiles/network/ssh.nix modules/network/ssh.nix
profiles/network/wpa_supplicant.nix modules/network/wpa_supplicant.nix
+9
shells/default.nix
··· 1 + {lib, ...}: 2 + lib.genPkgs (pkgs: { 3 + default = with pkgs; 4 + mkShell { 5 + name = "prts"; 6 + buildInputs = [git git-crypt]; 7 + shellHook = "echo welcome to PRTS, $USER"; 8 + }; 9 + })
+7 -7
users/patriot/default.nix
··· 1 1 { 2 - config, 3 2 pkgs, 4 3 lib, 5 4 ... 6 - }: let 5 + } @ globalAttrs: let 7 6 inherit (lib) mapAttrs' nameValuePair; 8 7 inherit (builtins) readDir fetchGit; 9 - pkgBin = lib.our.pkgBinNoDep pkgs; 10 - nixosConfig = config; 8 + 9 + pkgBin = lib.pkgBin pkgs; 10 + nixosConfig = globalAttrs.config; 11 11 in { 12 12 users.users.patriot = { 13 13 isNormalUser = true; ··· 234 234 ''; 235 235 in { 236 236 imports = [ 237 - ../profiles/direnv 238 - ../profiles/git 239 - ../profiles/starship 237 + ../modules/direnv 238 + ../modules/git 239 + ../modules/starship 240 240 ]; 241 241 fonts.fontconfig.enable = true; 242 242 home = {
users/profiles/direnv/default.nix users/modules/direnv/default.nix
users/profiles/git/default.nix users/modules/git/default.nix
users/profiles/hikari/default.nix users/modules/hikari/default.nix
users/profiles/starship/default.nix users/modules/starship/default.nix
users/profiles/wtf/default.nix users/modules/wtf/default.nix