| author | |
| committer | |
| log | b6f59a300d5533e9700c5b997b30d5e3d5a594aa |
| tree | f92eb37773287f999f45dc45832d955e5d12bc9d |
| parent | 0ea9675fc43f29a0de56780a321d73dec66c8466 |
| signature | Commit is signed but in an unrecognized format. |
7 files changed, 219 insertions(+), 152 deletions(-)
flake.lock+102-34| ... | ... | @@ -238,6 +238,24 @@ |
| 238 | 238 | "inputs": { |
| 239 | 239 | "systems": "systems" |
| 240 | 240 | }, |
| 241 | "locked": { | |
| 242 | "lastModified": 1731533236, | |
| 243 | "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", | |
| 244 | "owner": "numtide", | |
| 245 | "repo": "flake-utils", | |
| 246 | "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", | |
| 247 | "type": "github" | |
| 248 | }, | |
| 249 | "original": { | |
| 250 | "owner": "numtide", | |
| 251 | "repo": "flake-utils", | |
| 252 | "type": "github" | |
| 253 | } | |
| 254 | }, | |
| 255 | "flake-utils_2": { | |
| 256 | "inputs": { | |
| 257 | "systems": "systems_2" | |
| 258 | }, | |
| 241 | 259 | "locked": { |
| 242 | 260 | "lastModified": 1701680307, |
| 243 | 261 | "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", |
| ... | ... | @@ -252,9 +270,9 @@ |
| 252 | 270 | "type": "github" |
| 253 | 271 | } |
| 254 | 272 | }, |
| 255 | "flake-utils_2": { | |
| 273 | "flake-utils_3": { | |
| 256 | 274 | "inputs": { |
| 257 | "systems": "systems_2" | |
| 275 | "systems": "systems_3" | |
| 258 | 276 | }, |
| 259 | 277 | "locked": { |
| 260 | 278 | "lastModified": 1731533236, |
| ... | ... | @@ -270,9 +288,9 @@ |
| 270 | 288 | "type": "github" |
| 271 | 289 | } |
| 272 | 290 | }, |
| 273 | "flake-utils_3": { | |
| 291 | "flake-utils_4": { | |
| 274 | 292 | "inputs": { |
| 275 | "systems": "systems_3" | |
| 293 | "systems": "systems_4" | |
| 276 | 294 | }, |
| 277 | 295 | "locked": { |
| 278 | 296 | "lastModified": 1731533236, |
| ... | ... | @@ -288,9 +306,9 @@ |
| 288 | 306 | "type": "github" |
| 289 | 307 | } |
| 290 | 308 | }, |
| 291 | "flake-utils_4": { | |
| 309 | "flake-utils_5": { | |
| 292 | 310 | "inputs": { |
| 293 | "systems": "systems_6" | |
| 311 | "systems": "systems_7" | |
| 294 | 312 | }, |
| 295 | 313 | "locked": { |
| 296 | 314 | "lastModified": 1705309234, |
| ... | ... | @@ -306,9 +324,9 @@ |
| 306 | 324 | "type": "github" |
| 307 | 325 | } |
| 308 | 326 | }, |
| 309 | "flake-utils_5": { | |
| 327 | "flake-utils_6": { | |
| 310 | 328 | "inputs": { |
| 311 | "systems": "systems_7" | |
| 329 | "systems": "systems_8" | |
| 312 | 330 | }, |
| 313 | 331 | "locked": { |
| 314 | 332 | "lastModified": 1710146030, |
| ... | ... | @@ -324,9 +342,9 @@ |
| 324 | 342 | "type": "github" |
| 325 | 343 | } |
| 326 | 344 | }, |
| 327 | "flake-utils_6": { | |
| 345 | "flake-utils_7": { | |
| 328 | 346 | "inputs": { |
| 329 | "systems": "systems_8" | |
| 347 | "systems": "systems_9" | |
| 330 | 348 | }, |
| 331 | 349 | "locked": { |
| 332 | 350 | "lastModified": 1705309234, |
| ... | ... | @@ -342,6 +360,21 @@ |
| 342 | 360 | "type": "github" |
| 343 | 361 | } |
| 344 | 362 | }, |
| 363 | "flakey-profile": { | |
| 364 | "locked": { | |
| 365 | "lastModified": 1712898590, | |
| 366 | "narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=", | |
| 367 | "owner": "lf-", | |
| 368 | "repo": "flakey-profile", | |
| 369 | "rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d", | |
| 370 | "type": "github" | |
| 371 | }, | |
| 372 | "original": { | |
| 373 | "owner": "lf-", | |
| 374 | "repo": "flakey-profile", | |
| 375 | "type": "github" | |
| 376 | } | |
| 377 | }, | |
| 345 | 378 | "fromYaml": { |
| 346 | 379 | "flake": false, |
| 347 | 380 | "locked": { |
| ... | ... | @@ -514,6 +547,41 @@ |
| 514 | 547 | "url": "https://raw.githubusercontent.com/ziglang/zig/0fb2015fd3422fc1df364995f9782dfe7255eccd/doc/langref.html.in" |
| 515 | 548 | } |
| 516 | 549 | }, |
| 550 | "lix": { | |
| 551 | "flake": false, | |
| 552 | "locked": { | |
| 553 | "lastModified": 1746827285, | |
| 554 | "narHash": "sha256-hsFe4Tsqqg4l+FfQWphDtjC79WzNCZbEFhHI8j2KJzw=", | |
| 555 | "rev": "47aad376c87e2e65967f17099277428e4b3f8e5a", | |
| 556 | "type": "tarball", | |
| 557 | "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/47aad376c87e2e65967f17099277428e4b3f8e5a.tar.gz?rev=47aad376c87e2e65967f17099277428e4b3f8e5a" | |
| 558 | }, | |
| 559 | "original": { | |
| 560 | "type": "tarball", | |
| 561 | "url": "https://git.lix.systems/lix-project/lix/archive/2.93.0.tar.gz" | |
| 562 | } | |
| 563 | }, | |
| 564 | "lix-module": { | |
| 565 | "inputs": { | |
| 566 | "flake-utils": "flake-utils", | |
| 567 | "flakey-profile": "flakey-profile", | |
| 568 | "lix": "lix", | |
| 569 | "nixpkgs": [ | |
| 570 | "nixpkgs" | |
| 571 | ] | |
| 572 | }, | |
| 573 | "locked": { | |
| 574 | "lastModified": 1746838955, | |
| 575 | "narHash": "sha256-11R4K3iAx4tLXjUs+hQ5K90JwDABD/XHhsM9nkeS5N8=", | |
| 576 | "rev": "cd2a9c028df820a83ca2807dc6c6e7abc3dfa7fc", | |
| 577 | "type": "tarball", | |
| 578 | "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/cd2a9c028df820a83ca2807dc6c6e7abc3dfa7fc.tar.gz" | |
| 579 | }, | |
| 580 | "original": { | |
| 581 | "type": "tarball", | |
| 582 | "url": "https://git.lix.systems/lix-project/nixos-module/archive/2.93.0.tar.gz" | |
| 583 | } | |
| 584 | }, | |
| 517 | 585 | "mnw": { |
| 518 | 586 | "locked": { |
| 519 | 587 | "lastModified": 1747499976, |
| ... | ... | @@ -531,7 +599,7 @@ |
| 531 | 599 | }, |
| 532 | 600 | "moonlight": { |
| 533 | 601 | "inputs": { |
| 534 | "flake-utils": "flake-utils", | |
| 602 | "flake-utils": "flake-utils_2", | |
| 535 | 603 | "nixpkgs": [ |
| 536 | 604 | "nixpkgs" |
| 537 | 605 | ] |
| ... | ... | @@ -618,7 +686,7 @@ |
| 618 | 686 | }, |
| 619 | 687 | "nix-options-search": { |
| 620 | 688 | "inputs": { |
| 621 | "flake-utils": "flake-utils_2", | |
| 689 | "flake-utils": "flake-utils_3", | |
| 622 | 690 | "gitignore": "gitignore", |
| 623 | 691 | "nixpkgs": "nixpkgs" |
| 624 | 692 | }, |
| ... | ... | @@ -706,21 +774,6 @@ |
| 706 | 774 | "type": "github" |
| 707 | 775 | } |
| 708 | 776 | }, |
| 709 | "nixpkgs-stable_2": { | |
| 710 | "locked": { | |
| 711 | "lastModified": 1720535198, | |
| 712 | "narHash": "sha256-zwVvxrdIzralnSbcpghA92tWu2DV2lwv89xZc8MTrbg=", | |
| 713 | "owner": "NixOS", | |
| 714 | "repo": "nixpkgs", | |
| 715 | "rev": "205fd4226592cc83fd4c0885a3e4c9c400efabb5", | |
| 716 | "type": "github" | |
| 717 | }, | |
| 718 | "original": { | |
| 719 | "id": "nixpkgs", | |
| 720 | "ref": "nixos-23.11", | |
| 721 | "type": "indirect" | |
| 722 | } | |
| 723 | }, | |
| 724 | 777 | "nixpkgs_2": { |
| 725 | 778 | "locked": { |
| 726 | 779 | "lastModified": 1747744144, |
| ... | ... | @@ -797,13 +850,13 @@ |
| 797 | 850 | "nvf": { |
| 798 | 851 | "inputs": { |
| 799 | 852 | "flake-parts": "flake-parts", |
| 800 | "flake-utils": "flake-utils_3", | |
| 853 | "flake-utils": "flake-utils_4", | |
| 801 | 854 | "mnw": "mnw", |
| 802 | 855 | "nil": "nil", |
| 803 | 856 | "nixpkgs": [ |
| 804 | 857 | "nixpkgs" |
| 805 | 858 | ], |
| 806 | "systems": "systems_4" | |
| 859 | "systems": "systems_5" | |
| 807 | 860 | }, |
| 808 | 861 | "locked": { |
| 809 | 862 | "lastModified": 1747525582, |
| ... | ... | @@ -836,13 +889,13 @@ |
| 836 | 889 | "apple-fonts": "apple-fonts", |
| 837 | 890 | "darwin": "darwin", |
| 838 | 891 | "home-manager": "home-manager", |
| 892 | "lix-module": "lix-module", | |
| 839 | 893 | "moonlight": "moonlight", |
| 840 | 894 | "nh": "nh", |
| 841 | 895 | "nix-index-database": "nix-index-database", |
| 842 | 896 | "nix-options-search": "nix-options-search", |
| 843 | 897 | "nixos-cosmic": "nixos-cosmic", |
| 844 | 898 | "nixpkgs": "nixpkgs_2", |
| 845 | "nixpkgs-stable": "nixpkgs-stable_2", | |
| 846 | 899 | "nvf": "nvf", |
| 847 | 900 | "rust-overlay": "rust-overlay_3", |
| 848 | 901 | "stylix": "stylix", |
| ... | ... | @@ -1013,7 +1066,7 @@ |
| 1013 | 1066 | "nixpkgs" |
| 1014 | 1067 | ], |
| 1015 | 1068 | "nur": "nur", |
| 1016 | "systems": "systems_5", | |
| 1069 | "systems": "systems_6", | |
| 1017 | 1070 | "tinted-foot": "tinted-foot", |
| 1018 | 1071 | "tinted-kitty": "tinted-kitty", |
| 1019 | 1072 | "tinted-schemes": "tinted-schemes", |
| ... | ... | @@ -1154,6 +1207,21 @@ |
| 1154 | 1207 | "type": "github" |
| 1155 | 1208 | } |
| 1156 | 1209 | }, |
| 1210 | "systems_9": { | |
| 1211 | "locked": { | |
| 1212 | "lastModified": 1681028828, | |
| 1213 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", | |
| 1214 | "owner": "nix-systems", | |
| 1215 | "repo": "default", | |
| 1216 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", | |
| 1217 | "type": "github" | |
| 1218 | }, | |
| 1219 | "original": { | |
| 1220 | "owner": "nix-systems", | |
| 1221 | "repo": "default", | |
| 1222 | "type": "github" | |
| 1223 | } | |
| 1224 | }, | |
| 1157 | 1225 | "tinted-foot": { |
| 1158 | 1226 | "flake": false, |
| 1159 | 1227 | "locked": { |
| ... | ... | @@ -1260,7 +1328,7 @@ |
| 1260 | 1328 | "zig": { |
| 1261 | 1329 | "inputs": { |
| 1262 | 1330 | "flake-compat": "flake-compat_3", |
| 1263 | "flake-utils": "flake-utils_4", | |
| 1331 | "flake-utils": "flake-utils_5", | |
| 1264 | 1332 | "nixpkgs": "nixpkgs_3" |
| 1265 | 1333 | }, |
| 1266 | 1334 | "locked": { |
| ... | ... | @@ -1280,7 +1348,7 @@ |
| 1280 | 1348 | "zig-overlay": { |
| 1281 | 1349 | "inputs": { |
| 1282 | 1350 | "flake-compat": "flake-compat_4", |
| 1283 | "flake-utils": "flake-utils_6", | |
| 1351 | "flake-utils": "flake-utils_7", | |
| 1284 | 1352 | "nixpkgs": [ |
| 1285 | 1353 | "zls", |
| 1286 | 1354 | "nixpkgs" |
| ... | ... | @@ -1302,7 +1370,7 @@ |
| 1302 | 1370 | }, |
| 1303 | 1371 | "zls": { |
| 1304 | 1372 | "inputs": { |
| 1305 | "flake-utils": "flake-utils_5", | |
| 1373 | "flake-utils": "flake-utils_6", | |
| 1306 | 1374 | "gitignore": "gitignore_3", |
| 1307 | 1375 | "langref": "langref", |
| 1308 | 1376 | "nixpkgs": "nixpkgs_4", |
flake.nix+7-1| ... | ... | @@ -2,7 +2,11 @@ |
| 2 | 2 | description = "multi device configuration flake"; |
| 3 | 3 | inputs = { |
| 4 | 4 | nixpkgs.url = "nixpkgs/nixos-unstable"; |
| 5 | nixpkgs-stable.url = "nixpkgs/nixos-23.11"; | |
| 5 | ||
| 6 | lix-module = { | |
| 7 | url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.0.tar.gz"; | |
| 8 | inputs.nixpkgs.follows = "nixpkgs"; | |
| 9 | }; | |
| 6 | 10 | |
| 7 | 11 | home-manager.url = "github:nix-community/home-manager/master"; |
| 8 | 12 | home-manager.inputs.nixpkgs.follows = "nixpkgs"; |
| ... | ... | @@ -43,6 +47,7 @@ |
| 43 | 47 | { |
| 44 | 48 | self, |
| 45 | 49 | nixpkgs, |
| 50 | lix-module, | |
| 46 | 51 | nixos-cosmic, |
| 47 | 52 | darwin, |
| 48 | 53 | ... |
| ... | ... | @@ -92,6 +97,7 @@ |
| 92 | 97 | inherit |
| 93 | 98 | overlays |
| 94 | 99 | nixpkgs |
| 100 | lix-module | |
| 95 | 101 | inputs |
| 96 | 102 | mkNeovim |
| 97 | 103 | ; |
lib/mkSystem.nix+62-78| ... | ... | @@ -2,32 +2,24 @@ |
| 2 | 2 | # particular architecture. |
| 3 | 3 | { |
| 4 | 4 | nixpkgs, |
| 5 | lix-module, | |
| 5 | 6 | overlays, |
| 6 | 7 | inputs, |
| 7 | 8 | mkNeovim, |
| 8 | }: name: { | |
| 9 | }: | |
| 10 | name: | |
| 11 | { | |
| 9 | 12 | user, # ./users/{name} |
| 10 | 13 | host, # ./users/{name}/{host} |
| 11 | 14 | system, # arch-os |
| 12 | extraModules ? [], | |
| 13 | }: let | |
| 15 | extraModules ? [ ], | |
| 16 | }: | |
| 17 | let | |
| 14 | 18 | darwin = nixpkgs.lib.strings.hasSuffix "-darwin" system; |
| 15 | getInputModule = a: b: | |
| 16 | inputs.${ | |
| 17 | a | |
| 18 | }.${ | |
| 19 | if darwin | |
| 20 | then "darwinModules" | |
| 21 | else "nixosModules" | |
| 22 | }.${ | |
| 23 | b | |
| 24 | }; | |
| 19 | getInputModule = a: b: inputs.${a}.${if darwin then "darwinModules" else "nixosModules"}.${b}; | |
| 25 | 20 | |
| 26 | 21 | # NixOS vs nix-darwin functions |
| 27 | systemFunc = | |
| 28 | if darwin | |
| 29 | then inputs.darwin.lib.darwinSystem | |
| 30 | else nixpkgs.lib.nixosSystem; | |
| 22 | systemFunc = if darwin then inputs.darwin.lib.darwinSystem else nixpkgs.lib.nixosSystem; | |
| 31 | 23 | |
| 32 | 24 | userDir = ../users + "/${user}"; |
| 33 | 25 | userConfig = import (userDir + "/user.nix"); |
| ... | ... | @@ -38,10 +30,7 @@ |
| 38 | 30 | hostHomePath = hostDir + "/home.nix"; |
| 39 | 31 | userHomePath = userDir + "/home.nix"; |
| 40 | 32 | |
| 41 | pathOrNull = a: | |
| 42 | if builtins.pathExists a | |
| 43 | then a | |
| 44 | else null; | |
| 33 | pathOrNull = a: if builtins.pathExists a then a else null; | |
| 45 | 34 | |
| 46 | 35 | # Arguments passed to all module files |
| 47 | 36 | args = { |
| ... | ... | @@ -68,18 +57,14 @@ |
| 68 | 57 | term, # preferred $TERM |
| 69 | 58 | editor, # preferred $EDITOR |
| 70 | 59 | browser ? null, # preferred $BROWSER |
| 71 | } @ user: | |
| 72 | user | |
| 60 | }@user: | |
| 61 | user | |
| 73 | 62 | ) |
| 74 | userConfig; | |
| 63 | userConfig; | |
| 75 | 64 | }; |
| 76 | 65 | systemSettings = rec { |
| 77 | 66 | inherit darwin; |
| 78 | homeDir = "/${ | |
| 79 | if darwin | |
| 80 | then "Users" | |
| 81 | else "home" | |
| 82 | }/${userConfig.username}"; | |
| 67 | homeDir = "/${if darwin then "Users" else "home"}/${userConfig.username}"; | |
| 83 | 68 | }; |
| 84 | 69 | |
| 85 | 70 | mainHomeImports = builtins.filter (f: f != null) [ |
| ... | ... | @@ -92,60 +77,59 @@ |
| 92 | 77 | } |
| 93 | 78 | ]; |
| 94 | 79 | in |
| 95 | systemFunc { | |
| 96 | inherit system; | |
| 80 | systemFunc { | |
| 81 | inherit system; | |
| 97 | 82 | |
| 98 | modules = | |
| 99 | builtins.filter (f: f != null) [ | |
| 100 | # Apply our overlays. Overlays are keyed by system type so we have | |
| 101 | # to go through and apply our system type. We do this first so | |
| 102 | # the overlays are available globally. | |
| 103 | {nixpkgs.overlays = overlays;} | |
| 83 | modules = | |
| 84 | builtins.filter (f: f != null) [ | |
| 85 | # Apply our overlays. Overlays are keyed by system type so we have | |
| 86 | # to go through and apply our system type. We do this first so | |
| 87 | # the overlays are available globally. | |
| 88 | { nixpkgs.overlays = overlays; } | |
| 104 | 89 | |
| 105 | # Modules shared between nix-darwin and NixOS | |
| 106 | ../modules/shared | |
| 107 | # Modules for the specific OS | |
| 108 | ( | |
| 109 | if darwin | |
| 110 | then ../modules/macos | |
| 111 | else ../modules/nixos | |
| 112 | ) | |
| 90 | # Use lix (alternative nix implementation) | |
| 91 | # https://lix.systems/add-to-config/#flake-based-configurations | |
| 92 | lix-module.nixosModules.default | |
| 93 | # (getInputModule "lix-module" "default") | |
| 113 | 94 | |
| 114 | # The user-wide configuration.nix | |
| 115 | (pathOrNull userConfigPath) | |
| 116 | # The host-wide configuration.nix | |
| 117 | (pathOrNull hostConfigPath) | |
| 95 | # Modules shared between nix-darwin and NixOS | |
| 96 | ../modules/shared | |
| 97 | # Modules for the specific OS | |
| 98 | (if darwin then ../modules/macos else ../modules/nixos) | |
| 118 | 99 | |
| 119 | # Set up nix-index and enable comma for easy one-shot command use | |
| 120 | # https://github.com/nix-community/comma | |
| 121 | (getInputModule "nix-index-database" "nix-index") | |
| 122 | {programs.nix-index-database.comma.enable = true;} | |
| 100 | # The user-wide configuration.nix | |
| 101 | (pathOrNull userConfigPath) | |
| 102 | # The host-wide configuration.nix | |
| 103 | (pathOrNull hostConfigPath) | |
| 123 | 104 | |
| 124 | # Themes for all programs | |
| 125 | (getInputModule "stylix" "stylix") | |
| 105 | # Set up nix-index and enable comma for easy one-shot command use | |
| 106 | # https://github.com/nix-community/comma | |
| 107 | (getInputModule "nix-index-database" "nix-index") | |
| 108 | { programs.nix-index-database.comma.enable = true; } | |
| 126 | 109 | |
| 127 | # Home manager | |
| 128 | (getInputModule "home-manager" "home-manager") | |
| 129 | { | |
| 130 | home-manager = { | |
| 131 | useGlobalPkgs = true; | |
| 132 | useUserPackages = true; | |
| 133 | backupFileExtension = "hm-backup"; | |
| 134 | # Arguments passed to all module files | |
| 135 | extraSpecialArgs = | |
| 136 | args | |
| 137 | // { | |
| 138 | inherit mainHomeImports; | |
| 139 | }; | |
| 140 | # can't find how to make this an array without the param | |
| 141 | users.${userConfig.username} = ../modules/home; | |
| 110 | # Themes for all programs | |
| 111 | (getInputModule "stylix" "stylix") | |
| 112 | ||
| 113 | # Home manager | |
| 114 | (getInputModule "home-manager" "home-manager") | |
| 115 | { | |
| 116 | home-manager = { | |
| 117 | useGlobalPkgs = true; | |
| 118 | useUserPackages = true; | |
| 119 | backupFileExtension = "hm-backup"; | |
| 120 | # Arguments passed to all module files | |
| 121 | extraSpecialArgs = args // { | |
| 122 | inherit mainHomeImports; | |
| 142 | 123 | }; |
| 143 | users.users.${userConfig.username}.home = systemSettings.homeDir; | |
| 144 | } | |
| 124 | # can't find how to make this an array without the param | |
| 125 | users.${userConfig.username} = ../modules/home; | |
| 126 | }; | |
| 127 | users.users.${userConfig.username}.home = systemSettings.homeDir; | |
| 128 | } | |
| 145 | 129 | |
| 146 | # Arguments passed to all module files | |
| 147 | {config._module.args = args;} | |
| 148 | ] | |
| 149 | # Add extra modules specified from config | |
| 150 | ++ extraModules; | |
| 151 | } | |
| 130 | # Arguments passed to all module files | |
| 131 | { config._module.args = args; } | |
| 132 | ] | |
| 133 | # Add extra modules specified from config | |
| 134 | ++ extraModules; | |
| 135 | } |
users/natalie/vim/default.nix+1-1| ... | ... | @@ -4,6 +4,6 @@ |
| 4 | 4 | ./languages.nix |
| 5 | 5 | ./latex.nix |
| 6 | 6 | ./lean.nix |
| 7 | ./ui.nix | |
| 7 | ./visuals.nix | |
| 8 | 8 | ]; |
| 9 | 9 | } |
users/natalie/vim/languages.nix+26-22| ... | ... | @@ -4,24 +4,16 @@ |
| 4 | 4 | host, |
| 5 | 5 | pkgs, |
| 6 | 6 | ... |
| 7 | }: let | |
| 8 | darwin = | |
| 9 | if host.darwin | |
| 10 | then "darwin" | |
| 11 | else "nixos"; | |
| 12 | flakePath = "/${ | |
| 13 | if host.darwin | |
| 14 | then "Users" | |
| 15 | else "home" | |
| 16 | }/${user.username}/.dotfiles"; | |
| 7 | }: | |
| 8 | let | |
| 9 | darwin = if host.darwin then "darwin" else "nixos"; | |
| 10 | flakePath = "/${if host.darwin then "Users" else "home"}/${user.username}/.dotfiles"; | |
| 17 | 11 | |
| 18 | 12 | # BIG HACK DO NOT DO PLS |
| 19 | 13 | |
| 20 | hostname = | |
| 21 | if host.darwin | |
| 22 | then "Natalies-MacBook-Air" | |
| 23 | else "nixos"; | |
| 24 | in { | |
| 14 | hostname = if host.darwin then "Natalies-MacBook-Air" else "nixos"; | |
| 15 | in | |
| 16 | { | |
| 25 | 17 | vim = { |
| 26 | 18 | extraPackages = with pkgs; [ |
| 27 | 19 | python312Packages.pylatexenc |
| ... | ... | @@ -94,18 +86,30 @@ in { |
| 94 | 86 | enable = true; |
| 95 | 87 | setupOpts = { |
| 96 | 88 | formatters_by_ft = { |
| 97 | fish = ["fish_indent"]; | |
| 98 | tex = ["latexindent"]; | |
| 89 | fish = [ "fish_indent" ]; | |
| 90 | tex = [ "latexindent" ]; | |
| 99 | 91 | }; |
| 100 | 92 | }; |
| 101 | 93 | }; |
| 102 | 94 | |
| 103 | diagnostics.nvim-lint = { | |
| 95 | diagnostics = { | |
| 104 | 96 | enable = true; |
| 105 | linters_by_ft = { | |
| 106 | nix = ["statix"]; | |
| 107 | tex = ["chktex"]; | |
| 108 | haskell = ["hlint"]; | |
| 97 | config = { | |
| 98 | virtual_text = { | |
| 99 | format = pkgs.lib.generators.mkLuaInline '' | |
| 100 | function(diagnostic) | |
| 101 | return string.format("%s (%s)", diagnostic.message, diagnostic.source) | |
| 102 | end | |
| 103 | ''; | |
| 104 | }; | |
| 105 | }; | |
| 106 | nvim-lint = { | |
| 107 | enable = true; | |
| 108 | linters_by_ft = { | |
| 109 | nix = [ "statix" ]; | |
| 110 | tex = [ "chktex" ]; | |
| 111 | haskell = [ "hlint" ]; | |
| 112 | }; | |
| 109 | 113 | }; |
| 110 | 114 | }; |
| 111 | 115 | treesitter = { |
users/natalie/vim/ui.nix deleted-16| ... | ... | @@ -1,16 +0,0 @@ |
| 1 | {pkgs, ...}: { | |
| 2 | vim = { | |
| 3 | ui = { | |
| 4 | borders = { | |
| 5 | enable = true; | |
| 6 | }; | |
| 7 | }; | |
| 8 | ||
| 9 | # Better help docs | |
| 10 | lazy.plugins."helpview-nvim" = { | |
| 11 | enabled = true; | |
| 12 | package = pkgs.vimPlugins.helpview-nvim; | |
| 13 | lazy = false; | |
| 14 | }; | |
| 15 | }; | |
| 16 | } |
users/natalie/vim/visuals.nix created+21| ... | ... | @@ -0,0 +1,21 @@ |
| 1 | {pkgs, ...}: { | |
| 2 | vim = { | |
| 3 | visuals = { | |
| 4 | indent-blankline = { | |
| 5 | enable = true; | |
| 6 | }; | |
| 7 | }; | |
| 8 | ui = { | |
| 9 | borders = { | |
| 10 | enable = true; | |
| 11 | }; | |
| 12 | }; | |
| 13 | ||
| 14 | # Better help docs | |
| 15 | lazy.plugins."helpview.nvim" = { | |
| 16 | enabled = true; | |
| 17 | package = pkgs.vimPlugins.helpview-nvim; | |
| 18 | lazy = false; | |
| 19 | }; | |
| 20 | }; | |
| 21 | } |