authorgravatar for nmarks413@gmail.comNatalie Marks <nmarks413@gmail.com> 2025-05-21 15:25:56-07:00
committergravatar for nmarks413@gmail.comNatalie Marks <nmarks413@gmail.com> 2025-05-21 15:25:56-07:00
logb6f59a300d5533e9700c5b997b30d5e3d5a594aa
treef92eb37773287f999f45dc45832d955e5d12bc9d
parent0ea9675fc43f29a0de56780a321d73dec66c8466
signature Commit is signed but in an unrecognized format.

add diagnostics


7 files changed, 219 insertions(+), 152 deletions(-)

flake.lock+102-34
......@@ -238,6 +238,24 @@
238238 "inputs": {
239239 "systems": "systems"
240240 },
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 },
241259 "locked": {
242260 "lastModified": 1701680307,
243261 "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
......@@ -252,9 +270,9 @@
252270 "type": "github"
253271 }
254272 },
255 "flake-utils_2": {
273 "flake-utils_3": {
256274 "inputs": {
257 "systems": "systems_2"
275 "systems": "systems_3"
258276 },
259277 "locked": {
260278 "lastModified": 1731533236,
......@@ -270,9 +288,9 @@
270288 "type": "github"
271289 }
272290 },
273 "flake-utils_3": {
291 "flake-utils_4": {
274292 "inputs": {
275 "systems": "systems_3"
293 "systems": "systems_4"
276294 },
277295 "locked": {
278296 "lastModified": 1731533236,
......@@ -288,9 +306,9 @@
288306 "type": "github"
289307 }
290308 },
291 "flake-utils_4": {
309 "flake-utils_5": {
292310 "inputs": {
293 "systems": "systems_6"
311 "systems": "systems_7"
294312 },
295313 "locked": {
296314 "lastModified": 1705309234,
......@@ -306,9 +324,9 @@
306324 "type": "github"
307325 }
308326 },
309 "flake-utils_5": {
327 "flake-utils_6": {
310328 "inputs": {
311 "systems": "systems_7"
329 "systems": "systems_8"
312330 },
313331 "locked": {
314332 "lastModified": 1710146030,
......@@ -324,9 +342,9 @@
324342 "type": "github"
325343 }
326344 },
327 "flake-utils_6": {
345 "flake-utils_7": {
328346 "inputs": {
329 "systems": "systems_8"
347 "systems": "systems_9"
330348 },
331349 "locked": {
332350 "lastModified": 1705309234,
......@@ -342,6 +360,21 @@
342360 "type": "github"
343361 }
344362 },
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 },
345378 "fromYaml": {
346379 "flake": false,
347380 "locked": {
......@@ -514,6 +547,41 @@
514547 "url": "https://raw.githubusercontent.com/ziglang/zig/0fb2015fd3422fc1df364995f9782dfe7255eccd/doc/langref.html.in"
515548 }
516549 },
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 },
517585 "mnw": {
518586 "locked": {
519587 "lastModified": 1747499976,
......@@ -531,7 +599,7 @@
531599 },
532600 "moonlight": {
533601 "inputs": {
534 "flake-utils": "flake-utils",
602 "flake-utils": "flake-utils_2",
535603 "nixpkgs": [
536604 "nixpkgs"
537605 ]
......@@ -618,7 +686,7 @@
618686 },
619687 "nix-options-search": {
620688 "inputs": {
621 "flake-utils": "flake-utils_2",
689 "flake-utils": "flake-utils_3",
622690 "gitignore": "gitignore",
623691 "nixpkgs": "nixpkgs"
624692 },
......@@ -706,21 +774,6 @@
706774 "type": "github"
707775 }
708776 },
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 },
724777 "nixpkgs_2": {
725778 "locked": {
726779 "lastModified": 1747744144,
......@@ -797,13 +850,13 @@
797850 "nvf": {
798851 "inputs": {
799852 "flake-parts": "flake-parts",
800 "flake-utils": "flake-utils_3",
853 "flake-utils": "flake-utils_4",
801854 "mnw": "mnw",
802855 "nil": "nil",
803856 "nixpkgs": [
804857 "nixpkgs"
805858 ],
806 "systems": "systems_4"
859 "systems": "systems_5"
807860 },
808861 "locked": {
809862 "lastModified": 1747525582,
......@@ -836,13 +889,13 @@
836889 "apple-fonts": "apple-fonts",
837890 "darwin": "darwin",
838891 "home-manager": "home-manager",
892 "lix-module": "lix-module",
839893 "moonlight": "moonlight",
840894 "nh": "nh",
841895 "nix-index-database": "nix-index-database",
842896 "nix-options-search": "nix-options-search",
843897 "nixos-cosmic": "nixos-cosmic",
844898 "nixpkgs": "nixpkgs_2",
845 "nixpkgs-stable": "nixpkgs-stable_2",
846899 "nvf": "nvf",
847900 "rust-overlay": "rust-overlay_3",
848901 "stylix": "stylix",
......@@ -1013,7 +1066,7 @@
10131066 "nixpkgs"
10141067 ],
10151068 "nur": "nur",
1016 "systems": "systems_5",
1069 "systems": "systems_6",
10171070 "tinted-foot": "tinted-foot",
10181071 "tinted-kitty": "tinted-kitty",
10191072 "tinted-schemes": "tinted-schemes",
......@@ -1154,6 +1207,21 @@
11541207 "type": "github"
11551208 }
11561209 },
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 },
11571225 "tinted-foot": {
11581226 "flake": false,
11591227 "locked": {
......@@ -1260,7 +1328,7 @@
12601328 "zig": {
12611329 "inputs": {
12621330 "flake-compat": "flake-compat_3",
1263 "flake-utils": "flake-utils_4",
1331 "flake-utils": "flake-utils_5",
12641332 "nixpkgs": "nixpkgs_3"
12651333 },
12661334 "locked": {
......@@ -1280,7 +1348,7 @@
12801348 "zig-overlay": {
12811349 "inputs": {
12821350 "flake-compat": "flake-compat_4",
1283 "flake-utils": "flake-utils_6",
1351 "flake-utils": "flake-utils_7",
12841352 "nixpkgs": [
12851353 "zls",
12861354 "nixpkgs"
......@@ -1302,7 +1370,7 @@
13021370 },
13031371 "zls": {
13041372 "inputs": {
1305 "flake-utils": "flake-utils_5",
1373 "flake-utils": "flake-utils_6",
13061374 "gitignore": "gitignore_3",
13071375 "langref": "langref",
13081376 "nixpkgs": "nixpkgs_4",
flake.nix+7-1
......@@ -2,7 +2,11 @@
22 description = "multi device configuration flake";
33 inputs = {
44 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 };
610
711 home-manager.url = "github:nix-community/home-manager/master";
812 home-manager.inputs.nixpkgs.follows = "nixpkgs";
......@@ -43,6 +47,7 @@
4347 {
4448 self,
4549 nixpkgs,
50 lix-module,
4651 nixos-cosmic,
4752 darwin,
4853 ...
......@@ -92,6 +97,7 @@
9297 inherit
9398 overlays
9499 nixpkgs
100 lix-module
95101 inputs
96102 mkNeovim
97103 ;
lib/mkSystem.nix+62-78
......@@ -2,32 +2,24 @@
22# particular architecture.
33{
44 nixpkgs,
5 lix-module,
56 overlays,
67 inputs,
78 mkNeovim,
8}: name: {
9}:
10name:
11{
912 user, # ./users/{name}
1013 host, # ./users/{name}/{host}
1114 system, # arch-os
12 extraModules ? [],
13}: let
15 extraModules ? [ ],
16}:
17let
1418 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};
2520
2621 # 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;
3123
3224 userDir = ../users + "/${user}";
3325 userConfig = import (userDir + "/user.nix");
......@@ -38,10 +30,7 @@
3830 hostHomePath = hostDir + "/home.nix";
3931 userHomePath = userDir + "/home.nix";
4032
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;
4534
4635 # Arguments passed to all module files
4736 args = {
......@@ -68,18 +57,14 @@
6857 term, # preferred $TERM
6958 editor, # preferred $EDITOR
7059 browser ? null, # preferred $BROWSER
71 } @ user:
72 user
60 }@user:
61 user
7362 )
74 userConfig;
63 userConfig;
7564 };
7665 systemSettings = rec {
7766 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}";
8368 };
8469
8570 mainHomeImports = builtins.filter (f: f != null) [
......@@ -92,60 +77,59 @@
9277 }
9378 ];
9479in
95 systemFunc {
96 inherit system;
80systemFunc {
81 inherit system;
9782
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; }
10489
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")
11394
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)
11899
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)
123104
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; }
126109
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;
142123 };
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 }
145129
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 @@
44 ./languages.nix
55 ./latex.nix
66 ./lean.nix
7 ./ui.nix
7 ./visuals.nix
88 ];
99}
users/natalie/vim/languages.nix+26-22
......@@ -4,24 +4,16 @@
44 host,
55 pkgs,
66 ...
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}:
8let
9 darwin = if host.darwin then "darwin" else "nixos";
10 flakePath = "/${if host.darwin then "Users" else "home"}/${user.username}/.dotfiles";
1711
1812 # BIG HACK DO NOT DO PLS
1913
20 hostname =
21 if host.darwin
22 then "Natalies-MacBook-Air"
23 else "nixos";
24in {
14 hostname = if host.darwin then "Natalies-MacBook-Air" else "nixos";
15in
16{
2517 vim = {
2618 extraPackages = with pkgs; [
2719 python312Packages.pylatexenc
......@@ -94,18 +86,30 @@ in {
9486 enable = true;
9587 setupOpts = {
9688 formatters_by_ft = {
97 fish = ["fish_indent"];
98 tex = ["latexindent"];
89 fish = [ "fish_indent" ];
90 tex = [ "latexindent" ];
9991 };
10092 };
10193 };
10294
103 diagnostics.nvim-lint = {
95 diagnostics = {
10496 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 };
109113 };
110114 };
111115 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}