authorgravatar for nmarks413@gmail.comNatalie Marks <nmarks413@gmail.com> 2025-05-19 17:37:00-07:00
committergravatar for nmarks413@gmail.comNatalie Marks <nmarks413@gmail.com> 2025-05-19 17:37:00-07:00
log3449484e73eaf94679f490f8c96a7b187997462d
tree67b10f3ef9a639c91fe4c7ab1b4fa5afcf2a0283
parent1a6ac2017dfea76e017edf8e4a32bafc077eae6d
parentbe3db5e095ed7553faba41e6c589746b5f8c7ea5
signature Commit is signed but in an unrecognized format.

Merge branch 'paperclover-chloe'


49 files changed, 1367 insertions(+), 962 deletions(-)

flake.lock+113-71
...@@ -197,10 +197,7 @@...@@ -197,10 +197,7 @@
197 },197 },
198 "flake-parts": {198 "flake-parts": {
199 "inputs": {199 "inputs": {
200 "nixpkgs-lib": [200 "nixpkgs-lib": "nixpkgs-lib"
201 "nixvim",
202 "nixpkgs"
203 ]
204 },201 },
205 "locked": {202 "locked": {
206 "lastModified": 1743550720,203 "lastModified": 1743550720,
...@@ -315,7 +312,7 @@...@@ -315,7 +312,7 @@
315 },312 },
316 "flake-utils_5": {313 "flake-utils_5": {
317 "inputs": {314 "inputs": {
318 "systems": "systems_5"315 "systems": "systems_6"
319 },316 },
320 "locked": {317 "locked": {
321 "lastModified": 1705309234,318 "lastModified": 1705309234,
...@@ -333,7 +330,7 @@...@@ -333,7 +330,7 @@
333 },330 },
334 "flake-utils_6": {331 "flake-utils_6": {
335 "inputs": {332 "inputs": {
336 "systems": "systems_6"333 "systems": "systems_7"
337 },334 },
338 "locked": {335 "locked": {
339 "lastModified": 1710146030,336 "lastModified": 1710146030,
...@@ -351,7 +348,7 @@...@@ -351,7 +348,7 @@
351 },348 },
352 "flake-utils_7": {349 "flake-utils_7": {
353 "inputs": {350 "inputs": {
354 "systems": "systems_7"351 "systems": "systems_8"
355 },352 },
356 "locked": {353 "locked": {
357 "lastModified": 1705309234,354 "lastModified": 1705309234,
...@@ -527,34 +524,6 @@...@@ -527,34 +524,6 @@
527 "type": "github"524 "type": "github"
528 }525 }
529 },526 },
530 "ixx": {
531 "inputs": {
532 "flake-utils": [
533 "nixvim",
534 "nuschtosSearch",
535 "flake-utils"
536 ],
537 "nixpkgs": [
538 "nixvim",
539 "nuschtosSearch",
540 "nixpkgs"
541 ]
542 },
543 "locked": {
544 "lastModified": 1737371634,
545 "narHash": "sha256-fTVAWzT1UMm1lT+YxHuVPtH+DATrhYfea3B0MxG/cGw=",
546 "owner": "NuschtOS",
547 "repo": "ixx",
548 "rev": "a1176e2a10ce745ff8f63e4af124ece8fe0b1648",
549 "type": "github"
550 },
551 "original": {
552 "owner": "NuschtOS",
553 "ref": "v0.0.7",
554 "repo": "ixx",
555 "type": "github"
556 }
557 },
558 "langref": {527 "langref": {
559 "flake": false,528 "flake": false,
560 "locked": {529 "locked": {
...@@ -567,6 +536,21 @@...@@ -567,6 +536,21 @@
567 "url": "https://raw.githubusercontent.com/ziglang/zig/0fb2015fd3422fc1df364995f9782dfe7255eccd/doc/langref.html.in"536 "url": "https://raw.githubusercontent.com/ziglang/zig/0fb2015fd3422fc1df364995f9782dfe7255eccd/doc/langref.html.in"
568 }537 }
569 },538 },
539 "mnw": {
540 "locked": {
541 "lastModified": 1746338991,
542 "narHash": "sha256-GbyoHjf14LOxZQc+0NFblI4xf/uwGrYo3W8lwE4HcwI=",
543 "owner": "Gerg-L",
544 "repo": "mnw",
545 "rev": "c65407ee9387ef75985dad3e30f58c822c766ec1",
546 "type": "github"
547 },
548 "original": {
549 "owner": "Gerg-L",
550 "repo": "mnw",
551 "type": "github"
552 }
553 },
570 "moonlight": {554 "moonlight": {
571 "inputs": {555 "inputs": {
572 "flake-utils": "flake-utils",556 "flake-utils": "flake-utils",
...@@ -608,6 +592,32 @@...@@ -608,6 +592,32 @@
608 "type": "github"592 "type": "github"
609 }593 }
610 },594 },
595 "nil": {
596 "inputs": {
597 "flake-utils": [
598 "nvf",
599 "flake-utils"
600 ],
601 "nixpkgs": [
602 "nvf",
603 "nixpkgs"
604 ],
605 "rust-overlay": "rust-overlay_2"
606 },
607 "locked": {
608 "lastModified": 1741118843,
609 "narHash": "sha256-ggXU3RHv6NgWw+vc+HO4/9n0GPufhTIUjVuLci8Za8c=",
610 "owner": "oxalica",
611 "repo": "nil",
612 "rev": "577d160da311cc7f5042038456a0713e9863d09e",
613 "type": "github"
614 },
615 "original": {
616 "owner": "oxalica",
617 "repo": "nil",
618 "type": "github"
619 }
620 },
611 "nix-index-database": {621 "nix-index-database": {
612 "inputs": {622 "inputs": {
613 "nixpkgs": [623 "nixpkgs": [
...@@ -687,6 +697,21 @@...@@ -687,6 +697,21 @@
687 "type": "github"697 "type": "github"
688 }698 }
689 },699 },
700 "nixpkgs-lib": {
701 "locked": {
702 "lastModified": 1743296961,
703 "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=",
704 "owner": "nix-community",
705 "repo": "nixpkgs.lib",
706 "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa",
707 "type": "github"
708 },
709 "original": {
710 "owner": "nix-community",
711 "repo": "nixpkgs.lib",
712 "type": "github"
713 }
714 },
690 "nixpkgs-stable": {715 "nixpkgs-stable": {
691 "locked": {716 "locked": {
692 "lastModified": 1746557022,717 "lastModified": 1746557022,
...@@ -765,28 +790,6 @@...@@ -765,28 +790,6 @@
765 "type": "github"790 "type": "github"
766 }791 }
767 },792 },
768 "nixvim": {
769 "inputs": {
770 "flake-parts": "flake-parts",
771 "nixpkgs": [
772 "nixpkgs"
773 ],
774 "nuschtosSearch": "nuschtosSearch"
775 },
776 "locked": {
777 "lastModified": 1746625905,
778 "narHash": "sha256-El/fOZAhTDJRsPN5dro9F3cNHyclk00Acjl1nVQAEDI=",
779 "owner": "nix-community",
780 "repo": "nixvim",
781 "rev": "5c52e8f9e438b6850f2c7a6e4bf3f967a3a699fd",
782 "type": "github"
783 },
784 "original": {
785 "owner": "nix-community",
786 "repo": "nixvim",
787 "type": "github"
788 }
789 },
790 "nur": {793 "nur": {
791 "inputs": {794 "inputs": {
792 "flake-parts": "flake-parts_2",795 "flake-parts": "flake-parts_2",
...@@ -810,26 +813,28 @@...@@ -810,26 +813,28 @@
810 "type": "github"813 "type": "github"
811 }814 }
812 },815 },
813 "nuschtosSearch": {816 "nvf": {
814 "inputs": {817 "inputs": {
818 "flake-parts": "flake-parts",
815 "flake-utils": "flake-utils_3",819 "flake-utils": "flake-utils_3",
816 "ixx": "ixx",820 "mnw": "mnw",
821 "nil": "nil",
817 "nixpkgs": [822 "nixpkgs": [
818 "nixvim",
819 "nixpkgs"823 "nixpkgs"
820 ]824 ],
825 "systems": "systems_4"
821 },826 },
822 "locked": {827 "locked": {
823 "lastModified": 1745046075,828 "lastModified": 1746940940,
824 "narHash": "sha256-8v4y6k16Ra/fiecb4DxhsoOGtzLKgKlS+9/XJ9z0T2I=",829 "narHash": "sha256-ASB3QVEoFK5//280uedYdt8jyDLhFa9zgj8qfc0S7Sk=",
825 "owner": "NuschtOS",830 "owner": "notashelf",
826 "repo": "search",831 "repo": "nvf",
827 "rev": "066afe8643274470f4a294442aadd988356a478f",832 "rev": "815ed49d3693346122ef61da6d7443cd3cc21752",
828 "type": "github"833 "type": "github"
829 },834 },
830 "original": {835 "original": {
831 "owner": "NuschtOS",836 "owner": "notashelf",
832 "repo": "search",837 "repo": "nvf",
833 "type": "github"838 "type": "github"
834 }839 }
835 },840 },
...@@ -857,8 +862,8 @@...@@ -857,8 +862,8 @@
857 "nixos-cosmic": "nixos-cosmic",862 "nixos-cosmic": "nixos-cosmic",
858 "nixpkgs": "nixpkgs_2",863 "nixpkgs": "nixpkgs_2",
859 "nixpkgs-stable": "nixpkgs-stable_2",864 "nixpkgs-stable": "nixpkgs-stable_2",
860 "nixvim": "nixvim",865 "nvf": "nvf",
861 "rust-overlay": "rust-overlay_2",866 "rust-overlay": "rust-overlay_3",
862 "stylix": "stylix",867 "stylix": "stylix",
863 "zig": "zig",868 "zig": "zig",
864 "zls": "zls"869 "zls": "zls"
...@@ -886,6 +891,28 @@...@@ -886,6 +891,28 @@
886 }891 }
887 },892 },
888 "rust-overlay_2": {893 "rust-overlay_2": {
894 "inputs": {
895 "nixpkgs": [
896 "nvf",
897 "nil",
898 "nixpkgs"
899 ]
900 },
901 "locked": {
902 "lastModified": 1741055476,
903 "narHash": "sha256-52vwEV0oS2lCnx3c/alOFGglujZTLmObit7K8VblnS8=",
904 "owner": "oxalica",
905 "repo": "rust-overlay",
906 "rev": "aefb7017d710f150970299685e8d8b549d653649",
907 "type": "github"
908 },
909 "original": {
910 "owner": "oxalica",
911 "repo": "rust-overlay",
912 "type": "github"
913 }
914 },
915 "rust-overlay_3": {
889 "inputs": {916 "inputs": {
890 "nixpkgs": [917 "nixpkgs": [
891 "nixpkgs"918 "nixpkgs"
...@@ -1005,7 +1032,7 @@...@@ -1005,7 +1032,7 @@
1005 "nixpkgs"1032 "nixpkgs"
1006 ],1033 ],
1007 "nur": "nur",1034 "nur": "nur",
1008 "systems": "systems_4",1035 "systems": "systems_5",
1009 "tinted-foot": "tinted-foot",1036 "tinted-foot": "tinted-foot",
1010 "tinted-kitty": "tinted-kitty",1037 "tinted-kitty": "tinted-kitty",
1011 "tinted-schemes": "tinted-schemes",1038 "tinted-schemes": "tinted-schemes",
...@@ -1131,6 +1158,21 @@...@@ -1131,6 +1158,21 @@
1131 "type": "github"1158 "type": "github"
1132 }1159 }
1133 },1160 },
1161 "systems_8": {
1162 "locked": {
1163 "lastModified": 1681028828,
1164 "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
1165 "owner": "nix-systems",
1166 "repo": "default",
1167 "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
1168 "type": "github"
1169 },
1170 "original": {
1171 "owner": "nix-systems",
1172 "repo": "default",
1173 "type": "github"
1174 }
1175 },
1134 "tinted-foot": {1176 "tinted-foot": {
1135 "flake": false,1177 "flake": false,
1136 "locked": {1178 "locked": {
flake.nix+136-93
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1{1{
2 description = "New Modular flake!";2 description = "multi device configuration flake";
3 inputs = {3 inputs = {
4 nixpkgs.url = "nixpkgs/nixos-unstable";4 nixpkgs.url = "nixpkgs/nixos-unstable";
5 nixpkgs-stable.url = "nixpkgs/nixos-23.11";5 nixpkgs-stable.url = "nixpkgs/nixos-23.11";
...@@ -7,112 +7,155 @@...@@ -7,112 +7,155 @@
7 home-manager.url = "github:nix-community/home-manager/master";7 home-manager.url = "github:nix-community/home-manager/master";
8 home-manager.inputs.nixpkgs.follows = "nixpkgs";8 home-manager.inputs.nixpkgs.follows = "nixpkgs";
99
10 rust-overlay = {10 rust-overlay.url = "github:oxalica/rust-overlay";
11 url = "github:oxalica/rust-overlay";11 rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
12 inputs.nixpkgs.follows = "nixpkgs";
13 };
1412
15 apple-fonts = {13 apple-fonts.url = "github:Lyndeno/apple-fonts.nix";
16 url = "github:Lyndeno/apple-fonts.nix";14 apple-fonts.inputs.nixpkgs.follows = "nixpkgs";
17 inputs.nixpkgs.follows = "nixpkgs";
18 };
1915
20 nixvim = {16 nvf.url = "github:notashelf/nvf";
21 url = "github:nix-community/nixvim";17 nvf.inputs.nixpkgs.follows = "nixpkgs";
22 inputs.nixpkgs.follows = "nixpkgs";
23 };
2418
25 darwin = {19 darwin.url = "github:lnl7/nix-darwin/master";
26 url = "github:lnl7/nix-darwin/master";20 darwin.inputs.nixpkgs.follows = "nixpkgs";
27 inputs.nixpkgs.follows = "nixpkgs";
28 };
2921
30 zig.url = "github:mitchellh/zig-overlay";22 zig.url = "github:mitchellh/zig-overlay";
31 zls.url = "github:zigtools/zls?rev=a26718049a8657d4da04c331aeced1697bc7652b";23 zls.url = "github:zigtools/zls?rev=a26718049a8657d4da04c331aeced1697bc7652b";
3224
33 stylix = {25 stylix.url = "github:danth/stylix";
34 url = "github:danth/stylix";26 stylix.inputs.nixpkgs.follows = "nixpkgs";
35 inputs.nixpkgs.follows = "nixpkgs";
36 };
3727
38 moonlight = {28 moonlight.url = "github:moonlight-mod/moonlight"; # Add `/develop` to the flake URL to use nightly.
39 url = "github:moonlight-mod/moonlight"; # Add `/develop` to the flake URL to use nightly.29 moonlight.inputs.nixpkgs.follows = "nixpkgs";
40 inputs.nixpkgs.follows = "nixpkgs";
41 };
42 nixos-cosmic = {
43 url = "github:lilyinstarlight/nixos-cosmic";
44 inputs.nixpkgs.follows = "nixpkgs";
45 };
4630
47 nh = {31 nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic";
48 url = "github:viperML/nh";32 nixos-cosmic.inputs.nixpkgs.follows = "nixpkgs";
49 inputs.nixpkgs.follows = "nixpkgs";33
50 };34 nh.url = "github:viperML/nh";
51 nix-options-search = {35 nh.inputs.nixpkgs.follows = "nixpkgs";
52 url = "github:madsbv/nix-options-search";36
53 };37 nix-options-search.url = "github:madsbv/nix-options-search";
5438
55 nix-index-database.url = "github:nix-community/nix-index-database";39 nix-index-database.url = "github:nix-community/nix-index-database";
56 nix-index-database.inputs.nixpkgs.follows = "nixpkgs";40 nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
57 };41 };
58 outputs = {42 outputs =
59 nixpkgs,43 {
60 nixos-cosmic,44 nixpkgs,
61 nix-index-database,45 nixos-cosmic,
62 darwin,46 darwin,
63 ...47 ...
64 } @ inputs: let48 }@inputs:
65 overlays = [49 let
66 inputs.zig.overlays.default50 lib = nixpkgs.lib;
67 inputs.rust-overlay.overlays.default51
68 inputs.nh.overlays.default52 # TODO: apply these overlays sooner and remove uses of legacyPackages elsewhere.
69 ];53 overlays = [
7054 inputs.zig.overlays.default
71 mkSystem = import ./lib/mkSystem.nix {55 inputs.rust-overlay.overlays.default
72 inherit overlays nixpkgs inputs;56 inputs.nh.overlays.default
73 };57
74 in rec {58 # https://github.com/LnL7/nix-darwin/issues/1041
75 # "nix run .#darwin-rebuild"59 (_: prev: {
76 packages.aarch64-darwin.darwin-rebuild = darwin.packages.aarch64-darwin.darwin-rebuild;60 karabiner-elements = prev.karabiner-elements.overrideAttrs (old: {
77 # "nix fmt ."61 version = "14.13.0";
78 formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;62
79 formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.alejandra;63 src = prev.fetchurl {
8064 inherit (old.src) url;
81 # natalie's desktop computer65 hash = "sha256-gmJwoht/Tfm5qMecmq1N6PSAIfWOqsvuHU8VDJY8bLw=";
82 nixosConfigurations.nixos = mkSystem "nixos" {66 };
83 user = "natalie";67 });
84 host = "desktop";68 })
85 system = "x86_64-linux";
86 extraModules = [
87 nixos-cosmic.nixosModules.default
88 ];69 ];
89 };
90 # natalie's laptop
91 darwinConfigurations."Natalies-MacBook-Air" = mkSystem "Natalies-MacBook-Air" {
92 user = "natalie";
93 host = "laptop";
94 system = "aarch64-darwin";
95 };
9670
97 # chloe's mac studio "sandwich"71 # Users of this flake currently use x86_64 Linux and Apple Silicon
98 darwinConfigurations.sandwich = mkSystem "sandwich" {72 systems = [
99 user = "chloe";73 "x86_64-linux"
100 host = "sandwich";74 "aarch64-darwin"
101 system = "aarch64-darwin";75 ];
102 };76 forAllSystems =
103 # chloe's macbook air "paperback"77 f:
104 darwinConfigurations.paperback = mkSystem "paperback" {78 builtins.listToAttrs (
105 user = "chloe";79 builtins.map (system: {
106 host = "paperback";80 name = system;
107 system = "aarch64-darwin";81 value = f (
108 };82 inputs
83 // {
84 inherit system;
85 pkgs = nixpkgs.legacyPackages.${system};
86 }
87 );
88 }) systems
89 );
10990
110 # generate checks for "nix flake check --all-systems --no-build"91 mkSystem = import ./lib/mkSystem.nix {
111 checks.aarch64-darwin = builtins.listToAttrs (builtins.map (name: let92 inherit
112 d = darwinConfigurations.${name}.system;93 overlays
113 in {94 nixpkgs
114 name = "darwinConfiguration-" + d.name;95 inputs
115 value = d;96 mkNeovim
116 }) (builtins.attrNames darwinConfigurations));97 ;
117 };98 };
99 mkNeovim = import ./lib/mkNeovim.nix {
100 inherit overlays nixpkgs inputs;
101 };
102 in
103 rec {
104 # "nix fmt"
105 formatter = forAllSystems (inputs: inputs.pkgs.nixfmt-tree);
106 packages = forAllSystems (
107 { system, ... }:
108 {
109 nvim-chloe = mkNeovim "chloe" system;
110 nvim-natalie = mkNeovim "natalie" system;
111 }
112 // lib.optionalAttrs (system == "aarch64-darwin") {
113 # "nix run .#darwin-rebuild"
114 darwin-rebuild = darwin.packages.aarch64-darwin.darwin-rebuild;
115 }
116 );
117
118 # natalie's desktop computer
119 nixosConfigurations.nixos = mkSystem "nixos" {
120 user = "natalie";
121 host = "desktop";
122 system = "x86_64-linux";
123 extraModules = [
124 nixos-cosmic.nixosModules.default
125 ];
126 };
127 # natalie's laptop
128 darwinConfigurations."Natalies-MacBook-Air" = mkSystem "Natalies-MacBook-Air" {
129 user = "natalie";
130 host = "laptop";
131 system = "aarch64-darwin";
132 };
133
134 # chloe's mac studio "sandwich"
135 darwinConfigurations.sandwich = mkSystem "sandwich" {
136 user = "chloe";
137 host = "sandwich";
138 system = "aarch64-darwin";
139 };
140 # chloe's macbook air "paperback"
141 darwinConfigurations.paperback = mkSystem "paperback" {
142 user = "chloe";
143 host = "paperback";
144 system = "aarch64-darwin";
145 };
146
147 # generate checks for "nix flake check --all-systems --no-build"
148 checks.aarch64-darwin = builtins.listToAttrs (
149 builtins.map (
150 name:
151 let
152 d = darwinConfigurations.${name}.system;
153 in
154 {
155 name = "darwinConfiguration-" + d.name;
156 value = d;
157 }
158 ) (builtins.attrNames darwinConfigurations)
159 );
160 };
118}161}
lib/mkNeovim.nix created+29
...@@ -0,0 +1,29 @@
1{
2 nixpkgs,
3 # TODO: apply overlays here
4 overlays,
5 inputs,
6}:
7user: system:
8let
9 darwin = nixpkgs.lib.strings.hasSuffix "-darwin" system;
10
11 host = {
12 inherit darwin;
13 linux = !darwin;
14 };
15
16 userDir = ../users + "/${user}";
17 userConfig = import (userDir + "/user.nix");
18in
19(inputs.nvf.lib.neovimConfiguration {
20 pkgs = nixpkgs.legacyPackages.${system};
21 modules = builtins.filter (f: f != null) [
22 (../users + ("/" + user + "/vim.nix"))
23 ../modules/neovim
24 ];
25 extraSpecialArgs = {
26 inherit host;
27 user = userConfig;
28 };
29}).neovim
lib/mkSystem.nix+85-105
...@@ -4,30 +4,21 @@...@@ -4,30 +4,21 @@
4 nixpkgs,4 nixpkgs,
5 overlays,5 overlays,
6 inputs,6 inputs,
7}: name: {7 mkNeovim,
8}:
9name:
10{
8 user, # ./users/{name}11 user, # ./users/{name}
9 host, # ./users/{name}/{host} (optional)12 host, # ./users/{name}/{host} (optional)
10 system, # arch-os13 system, # arch-os
11 extraModules ? [],14 extraModules ? [ ],
12}: let15}:
13 inherit (builtins) pathExists;16let
14 darwin = nixpkgs.lib.strings.hasSuffix "-darwin" system;17 darwin = nixpkgs.lib.strings.hasSuffix "-darwin" system;
15 getInputModule = a: b:18 getInputModule = a: b: inputs.${a}.${if darwin then "darwinModules" else "nixosModules"}.${b};
16 inputs.${
17 a
18 }.${
19 if darwin
20 then "darwinModules"
21 else "nixosModules"
22 }.${
23 b
24 };
2519
26 # NixOS vs nix-darwin functions20 # NixOS vs nix-darwin functions
27 systemFunc =21 systemFunc = if darwin then inputs.darwin.lib.darwinSystem else nixpkgs.lib.nixosSystem;
28 if darwin
29 then inputs.darwin.lib.darwinSystem
30 else nixpkgs.lib.nixosSystem;
3122
32 userDir = ../users + "/${user}";23 userDir = ../users + "/${user}";
33 userConfig = import (userDir + "/user.nix");24 userConfig = import (userDir + "/user.nix");
...@@ -38,10 +29,7 @@...@@ -38,10 +29,7 @@
38 hostHomePath = hostDir + "/home.nix";29 hostHomePath = hostDir + "/home.nix";
39 userHomePath = userDir + "/home.nix";30 userHomePath = userDir + "/home.nix";
4031
41 pathOrNull = a:32 pathOrNull = a: if builtins.pathExists a then a else null;
42 if pathExists a
43 then a
44 else null;
4533
46 # Arguments passed to all module files34 # Arguments passed to all module files
47 args = {35 args = {
...@@ -50,100 +38,92 @@...@@ -50,100 +38,92 @@
50 # Details about the host machine38 # Details about the host machine
51 host = {39 host = {
52 inherit darwin name;40 inherit darwin name;
41 linux = !darwin;
53 };42 };
54 user = ({43 user =
55 # This acts as formal documentation for what is allowed in user.nix44 (
56 username, # unix username45 {
57 name, # your display name46 # This acts as formal documentation for what is allowed in user.nix
58 email, # for identity in programs such as git47 username, # unix username
59 dotfilesDir, # location to `../.`48 name, # your display name
60 timeZone ? "America/Los_Angeles",49 email, # for identity in programs such as git
61 # Stylix/Theming50 dotfilesDir, # location to `../.`
62 theme ? null, # theme name for stylix51 timeZone ? "America/Los_Angeles",
63 sexuality ? null, # pride flag for hyfetch52 # Stylix/Theming
64 font ? null, # font to use53 theme ? null, # theme name for stylix
65 term, # preferred $TERM54 sexuality ? null, # pride flag for hyfetch
66 editor, # preferred $EDITOR55 font ? null, # font to use
67 browser ? null, # preferred $BROWSER56 term, # preferred $TERM
68 } @ user:57 editor, # preferred $EDITOR
69 user)58 browser ? null, # preferred $BROWSER
70 userConfig;59 }@user:
60 user
61 )
62 userConfig;
71 };63 };
72 systemSettings = rec {64 systemSettings = rec {
73 inherit darwin;65 inherit darwin;
74 homeDir = "/${66 homeDir = "/${if darwin then "Users" else "home"}/${userConfig.username}";
75 if darwin
76 then "Users"
77 else "home"
78 }/${userConfig.username}";
79 };67 };
68
69 mainHomeImports = builtins.filter (f: f != null) [
70 (pathOrNull userHomePath)
71 (pathOrNull hostHomePath)
72 {
73 home.packages = [
74 (mkNeovim user system)
75 ];
76 }
77 ];
80in78in
81 systemFunc {79systemFunc {
82 inherit system;80 inherit system;
8381
84 modules =82 modules =
85 builtins.filter (f: f != null)83 builtins.filter (f: f != null) [
86 [84 # Apply our overlays. Overlays are keyed by system type so we have
87 # Apply our overlays. Overlays are keyed by system type so we have85 # to go through and apply our system type. We do this first so
88 # to go through and apply our system type. We do this first so86 # the overlays are available globally.
89 # the overlays are available globally.87 { nixpkgs.overlays = overlays; }
90 {nixpkgs.overlays = overlays;}
9188
92 # Modules shared between nix-darwin and NixOS89 # Modules shared between nix-darwin and NixOS
93 ../modules/shared90 ../modules/shared
94 # Modules for the specific OS91 # Modules for the specific OS
95 (92 (if darwin then ../modules/macos else ../modules/nixos)
96 if darwin
97 then ../modules/macos
98 else ../modules/nixos
99 )
10093
101 # The user-wide configuration.nix94 # The user-wide configuration.nix
102 (pathOrNull userConfigPath)95 (pathOrNull userConfigPath)
103 # The host-wide configuration.nix96 # The host-wide configuration.nix
104 (97 (pathOrNull hostConfigPath)
105 pathOrNull hostConfigPath
106 )
10798
108 # Set up nix-index and enable comma for easy one-shot command use99 # Set up nix-index and enable comma for easy one-shot command use
109 # https://github.com/nix-community/comma100 # https://github.com/nix-community/comma
110 (getInputModule "nix-index-database" "nix-index")101 (getInputModule "nix-index-database" "nix-index")
111 {programs.nix-index-database.comma.enable = true;}102 { programs.nix-index-database.comma.enable = true; }
112103
113 # Themes for all programs104 # Themes for all programs
114 (getInputModule "stylix" "stylix")105 (getInputModule "stylix" "stylix")
115106
116 # Home manager107 # Home manager
117 (getInputModule "home-manager" "home-manager")108 (getInputModule "home-manager" "home-manager")
118 {109 {
119 home-manager = {110 home-manager = {
120 useGlobalPkgs = true;111 useGlobalPkgs = true;
121 useUserPackages = true;112 useUserPackages = true;
122 backupFileExtension = "hm-backup";113 backupFileExtension = "hm-backup";
123 # Arguments passed to all module files114 # Arguments passed to all module files
124 extraSpecialArgs =115 extraSpecialArgs = args // {
125 args116 inherit mainHomeImports;
126 // {
127 mainHomeImports = builtins.filter (f: f != null) [
128 (
129 pathOrNull userHomePath
130 )
131 (
132 pathOrNull hostHomePath
133 )
134 #Can't have conditional import path
135 ../modules/macos/tiling/sketchybar-home.nix
136 ];
137 };
138 # can't find how to make this an array without the param
139 users.${userConfig.username} = ../modules/home-manager.nix;
140 };117 };
141 users.users.${userConfig.username}.home = systemSettings.homeDir;118 # can't find how to make this an array without the param
142 }119 users.${userConfig.username} = ../modules/home;
120 };
121 users.users.${userConfig.username}.home = systemSettings.homeDir;
122 }
143123
144 # Arguments passed to all module files124 # Arguments passed to all module files
145 {config._module.args = args;}125 { config._module.args = args; }
146 ]126 ]
147 # Add extra modules specified from config127 # Add extra modules specified from config
148 ++ extraModules;128 ++ extraModules;
149 }129}
modules/home-manager.nix deleted-82
...@@ -1,82 +0,0 @@
1# This contains default configurations for set of programs
2# and configuration, but does not enable many things on it's own.
3{
4 pkgs,
5 lib,
6 config,
7 user,
8 host,
9 mainHomeImports,
10 ...
11}: let
12 cfg = config.programs;
13in {
14 imports = mainHomeImports;
15 programs = {
16 home-manager.enable = true;
17 nix-index.enable = true;
18
19 direnv = {
20 enableZshIntegration = true;
21 nix-direnv.enable = config.programs.direnv.enable;
22 };
23
24 git = {
25 enable = true;
26 userName = lib.mkDefault user.name;
27 userEmail = lib.mkDefault user.email;
28 ignores = [
29 (lib.mkIf host.darwin ".DS_Store") # When using Finder
30 (lib.mkIf host.darwin "._*") # When using non-APFS drives
31 # ViM and Neovim
32 ".*.swp"
33 ".nvimlog"
34 ];
35 };
36
37 atuin = {
38 enableBashIntegration = true;
39 enableFishIntegration = true;
40 daemon.enable = cfg.atuin.enable;
41 };
42 bat = {
43 extraPackages = with pkgs.bat-extras; [batdiff batman batgrep batwatch batpipe prettybat];
44 };
45 hyfetch = {
46 settings = {
47 backend = "fastfetch";
48 preset = user.sexuality;
49 mode = "rgb";
50 light_dark = "dark";
51 lightness = {
52 };
53 color_align = {
54 mode = "horizontal";
55 };
56 };
57 };
58 fastfetch.enable = cfg.hyfetch.enable;
59
60 fish = {
61 plugins = [
62 {
63 name = "tide";
64 inherit (pkgs.fishPlugins.tide) src;
65 }
66 {
67 name = "!!";
68 inherit (pkgs.fishPlugins.bang-bang) src;
69 }
70 ];
71 shellAliases =
72 {}
73 // lib.optionalAttrs (!host.darwin) {
74 reboot-windows = "sudo efibootmgr --bootnext 0000; sudo reboot -h now";
75 };
76 shellInit = ''
77 batman --export-env | source
78 '';
79 ##test -r '/Users/${user.username}/.opam/opam-init/init.fish' && source '/Users/${user.username}/.opam/opam-init/init.fish' > /dev/null 2> /dev/null; or true
80 };
81 };
82}
modules/home/default.nix created+93
...@@ -0,0 +1,93 @@
1# This contains default configurations for set of programs
2# and configuration, but does not enable many things on it's own.
3{
4 pkgs,
5 lib,
6 config,
7 user,
8 host,
9 mainHomeImports,
10 ...
11}:
12let
13 cfg = config.programs;
14in
15{
16 imports = mainHomeImports ++ [
17 ./macos/sketchybar.nix
18 ];
19 programs = {
20 home-manager.enable = true;
21 nix-index.enable = true;
22
23 direnv = {
24 enableZshIntegration = true;
25 nix-direnv.enable = config.programs.direnv.enable;
26 };
27
28 git = {
29 enable = true;
30 userName = lib.mkDefault user.name;
31 userEmail = lib.mkDefault user.email;
32 ignores = [
33 (lib.mkIf host.darwin ".DS_Store") # When using Finder
34 (lib.mkIf host.darwin "._*") # When using non-APFS drives
35 # ViM and Neovim
36 ".*.swp"
37 ".nvimlog"
38 ];
39 };
40
41 atuin = {
42 enableBashIntegration = true;
43 enableFishIntegration = true;
44 daemon.enable = cfg.atuin.enable;
45 };
46 bat = {
47 extraPackages = with pkgs.bat-extras; [
48 batdiff
49 batman
50 batgrep
51 batwatch
52 batpipe
53 prettybat
54 ];
55 };
56 hyfetch = {
57 settings = {
58 backend = "fastfetch";
59 preset = user.sexuality;
60 mode = "rgb";
61 light_dark = "dark";
62 lightness = {
63 };
64 color_align = {
65 mode = "horizontal";
66 };
67 };
68 };
69 fastfetch.enable = cfg.hyfetch.enable;
70
71 fish = {
72 plugins = [
73 {
74 name = "tide";
75 inherit (pkgs.fishPlugins.tide) src;
76 }
77 {
78 name = "!!";
79 inherit (pkgs.fishPlugins.bang-bang) src;
80 }
81 ];
82 shellAliases =
83 { }
84 // lib.optionalAttrs (!host.darwin) {
85 reboot-windows = "sudo efibootmgr --bootnext 0000; sudo reboot -h now";
86 };
87 shellInit = ''
88 batman --export-env | source
89 '';
90 ##test -r '/Users/${user.username}/.opam/opam-init/init.fish' && source '/Users/${user.username}/.opam/opam-init/init.fish' > /dev/null 2> /dev/null; or true
91 };
92 };
93}
modules/home/macos/sketchybar.nix created+408
...@@ -0,0 +1,408 @@
1{
2 pkgs,
3 lib,
4 config,
5 host,
6 ...
7}:
8let
9 # folder = "${config.home.homeDirectory}.dotfiles/files/sketchybar";
10 # folder = "~/.dotfiles/files/sketchybar";
11 folder = ../../../files/sketchybar;
12in
13lib.mkIf (host.darwin) {
14 home.file =
15 lib.attrsets.mapAttrs
16 (
17 file: value: (lib.attrsets.overrideExisting value { enable = config.shared.darwin.tiling.enable; })
18 )
19 {
20 sketchybarrc = {
21 executable = true;
22 target = ".config/sketchybar/sketchybarrc";
23 text = ''
24 #!/usr/bin/env sh
25
26 source "$HOME/.config/sketchybar/colors.sh" # Loads all defined colors
27 source "$HOME/.config/sketchybar/icons.sh" # Loads all defined icons
28
29 ITEM_DIR="$HOME/.config/sketchybar/items" # Directory where the items are configured
30 PLUGIN_DIR="$HOME/.config/sketchybar/plugins" # Directory where all the plugin scripts are stored
31
32 FONT="SF Pro" # Needs to have Regular, Bold, Semibold, Heavy and Black variants
33 PADDINGS=3 # All paddings use this value (icon, label, background)
34
35 # Setting up and starting the helper process
36 HELPER=git.felix.helper
37 killall helper
38 cd $HOME/.config/sketchybar/helper && make
39 $HOME/.config/sketchybar/helper/helper $HELPER > /dev/null 2>&1 &
40
41 # Unload the macOS on screen indicator overlay for volume change
42 # launchctl unload -F /System/Library/LaunchAgents/com.apple.OSDUIHelper.plist > /dev/null 2>&1 &
43
44 # Setting up the general bar appearance and default values
45 ${pkgs.sketchybar}/bin/sketchybar --bar height=40 \
46 color=$BAR_COLOR \
47 shadow=off \
48 position=top \
49 sticky=on \
50 padding_right=0 \
51 padding_left=0 \
52 corner_radius=12 \
53 y_offset=0 \
54 margin=2 \
55 blur_radius=0 \
56 notch_width=0 \
57 --default updates=when_shown \
58 icon.font="$FONT:Bold:14.0" \
59 icon.color=$ICON_COLOR \
60 icon.padding_left=$PADDINGS \
61 icon.padding_right=$PADDINGS \
62 label.font="$FONT:Semibold:13.0" \
63 label.color=$LABEL_COLOR \
64 label.padding_left=$PADDINGS \
65 label.padding_right=$PADDINGS \
66 background.padding_right=$PADDINGS \
67 background.padding_left=$PADDINGS \
68 background.height=26 \
69 background.corner_radius=9 \
70 popup.background.border_width=2 \
71 popup.background.corner_radius=11 \
72 popup.background.border_color=$POPUP_BORDER_COLOR \
73 popup.background.color=$POPUP_BACKGROUND_COLOR \
74 popup.background.shadow.drawing=on
75
76 # Left
77 source "$ITEM_DIR/apple.sh"
78 source "$ITEM_DIR/spaces.sh"
79 source "$ITEM_DIR/front_app.sh"
80
81 # Center
82 # source "$ITEM_DIR/spotify.sh"
83 source "$ITEM_DIR/calendar.sh"
84
85 # Right
86 # source "$ITEM_DIR/brew.sh"
87 # source "$ITEM_DIR/github.sh"
88 source "$ITEM_DIR/volume.sh"
89 # source "$ITEM_DIR/divider.sh"
90 # source "$ITEM_DIR/cpu.sh"
91
92 # Forcing all item scripts to run (never do this outside of sketchybarrc)
93 ${pkgs.sketchybar}/bin/sketchybar --update
94
95 echo "sketchybar configuation loaded.."
96 '';
97 };
98 icons = {
99 executable = true;
100 target = ".config/sketchybar/icons.sh";
101 source = folder + /icons.sh;
102 };
103 colors = {
104 executable = true;
105 target = ".config/sketchybar/colors.sh";
106 text = ''
107 #!/usr/bin/env sh
108 # Color Palette
109 export BLACK=0xff4c4f69
110 export WHITE=0xffeff1f5
111 export RED=0xffd20f39
112 export GREEN=0xff40a02b
113 export BLUE=0xff1e66f5
114 export YELLOW=0xffdf8e1d
115 export ORANGE=0xfffe640b
116 export MAGENTA=0xffea76cb
117 export GREY=0xff9ca0b0
118 export TRANSPARENT=0xff000000
119 export BLUE2=0xff7287fd
120 export FLAMINGO=0xffdd7878
121
122 # General bar colors
123 export BAR_COLOR=0xeff1f5ff # Color of the bar
124 export ICON_COLOR=0xff4c4f69
125 export LABEL_COLOR=0xff4c4f69 # Color of all labels
126 export BACKGROUND_1=0xffbcc0cc
127 export BACKGROUND_2=0xffbcc0cc
128
129 export POPUP_BACKGROUND_COLOR=$BLACK
130 export POPUP_BORDER_COLOR=$WHITE
131
132 export SHADOW_COLOR=$BLACK
133 '';
134 };
135 items_apple = {
136 executable = true;
137 target = ".config/sketchybar/items/apple.sh";
138 source = folder + /items/executable_apple.sh;
139 };
140 items_brew = {
141 executable = true;
142 target = ".config/sketchybar/items/brew.sh";
143 source = folder + /items/executable_brew.sh;
144 };
145 items_calendar = {
146 executable = true;
147 target = ".config/sketchybar/items/calendar.sh";
148 text = ''
149 #!/usr/bin/env sh
150
151 sketchybar --add item calendar center \
152 --set calendar icon=cal \
153 display=1 \
154 icon.font="$FONT:Black:12.0" \
155 icon.padding_right=0 \
156 label.width=50 \
157 label.align=right \
158 background.padding_left=15 \
159 update_freq=30 \
160 script="$PLUGIN_DIR/calendar.sh" \
161 click_script="$PLUGIN_DIR/zen.sh"
162 '';
163 };
164 items_cpu = {
165 executable = true;
166 target = ".config/sketchybar/items/cpu.sh";
167 source = folder + /items/executable_cpu.sh;
168 };
169 items_divider = {
170 executable = true;
171 target = ".config/sketchybar/items/divider.sh";
172 source = folder + /items/executable_divider.sh;
173 };
174 items_front_app = {
175 executable = true;
176 target = ".config/sketchybar/items/front_app.sh";
177 text = ''
178 #!/usr/bin/env sh
179 FRONT_APP_SCRIPT='sketchybar --set $NAME label="$INFO"'
180 sketchybar --add event window_focus \
181 --add event windows_on_spaces \
182 --add item system.aerospace left \
183 --set system.aerospace script="$PLUGIN_DIR/aerospace.sh" \
184 icon.font="$FONT:Bold:16.0" \
185 label.drawing=off \
186 icon.width=30 \
187 icon=$YABAI_GRID \
188 icon.color=$BLACK \
189 updates=on \
190 display=active \
191 --subscribe system.aerospace window_focus \
192 windows_on_spaces \
193 mouse.clicked \
194 --add item front_app left \
195 --set front_app script="$FRONT_APP_SCRIPT" \
196 icon.drawing=off \
197 background.padding_left=0 \
198 background.padding_right=10 \
199 label.color=$BLACK \
200 label.font="$FONT:Black:12.0" \
201 display=active \
202 --subscribe front_app front_app_switched
203 '';
204 };
205 items_github = {
206 executable = true;
207 target = ".config/sketchybar/items/github.sh";
208 source = folder + /items/executable_github.sh;
209 };
210 items_spaces = {
211 executable = true;
212 target = ".config/sketchybar/items/spaces.sh";
213 # label.background.color=$BACKGROUND_2
214 text = ''
215 ${pkgs.sketchybar}/bin/sketchybar --add event aerospace_workspace_change
216 ${pkgs.sketchybar}/bin/sketchybar --add event aerospace_mode_change
217 for sid in $(${pkgs.aerospace}/bin/aerospace list-workspaces --all); do
218 ${pkgs.sketchybar}/bin/sketchybar --add item space.$sid left \
219 --subscribe space.$sid aerospace_workspace_change \
220 --subscribe space.$sid aerospace_mode_change \
221 --set space.$sid \
222 icon=$sid \
223 icon.padding_left=22 \
224 icon.padding_right=22 \
225 icon.highlight_color=$WHITE \
226 icon.highlight=off \
227 icon.color=0xff4c566a \
228 background.padding_left=-8 \
229 background.padding_right=-8 \
230 background.color=$BACKGROUND_1 \
231 background.drawing=on \
232 script="$PLUGIN_DIR/aerospace.sh $sid" \
233 click_script="aerospace workspace $sid" \
234 label.font="Iosevka Nerd Font:Regular:16.0" \
235 label.padding_right=33 \
236 label.background.height=26 \
237 label.background.drawing=on \
238 label.background.corner_radius=9 \
239 label.drawing=off
240 done
241 ${pkgs.sketchybar}/bin/sketchybar --add item separator left \
242 --set separator icon= \
243 icon.font="Iosevka Nerd Font:Regular:16.0" \
244 background.padding_left=26 \
245 background.padding_right=15 \
246 label.drawing=off \
247 display=active \
248 icon.color=$GREEN
249 '';
250 };
251 items_spotify = {
252 executable = true;
253 target = ".config/sketchybar/items/spotify.sh";
254 source = folder + /items/executable_spotify.sh;
255 };
256 items_volume = {
257 executable = true;
258 target = ".config/sketchybar/items/volume.sh";
259 text = ''
260 INITIAL_WIDTH=$(osascript -e 'set ovol to output volume of (get volume settings)')
261 ${pkgs.sketchybar}/bin/sketchybar --add item volume right \
262 --subscribe volume volume_change \
263 --set volume script="$PLUGIN_DIR/volume.sh" \
264 updates=on \
265 icon.background.drawing=on \
266 icon.background.color=$FLAMINGO \
267 icon.background.height=8 \
268 icon.background.corner_radius=3 \
269 icon.width=$INITIAL_WIDTH \
270 width=100 \
271 icon.align=right \
272 label.drawing=off \
273 background.drawing=on \
274 background.color=$BACKGROUND_2 \
275 background.height=8 \
276 background.corner_radius=3 \
277 align=left
278
279 ${pkgs.sketchybar}/bin/sketchybar --add alias "Control Center,Sound" right \
280 --rename "Control Center,Sound" volume_alias \
281 --set volume_alias icon.drawing=off \
282 label.drawing=off \
283 alias.color=$BLUE2 \
284 background.padding_right=0 \
285 background.padding_left=5 \
286 width=50 \
287 align=right \
288 click_script="$PLUGIN_DIR/volume_click.sh"
289
290 '';
291 };
292 plugins_brew = {
293 executable = true;
294 target = ".config/sketchybar/plugins/brew.sh";
295 source = folder + /plugins/executable_brew.sh;
296 };
297 plugins_calendar = {
298 executable = true;
299 target = ".config/sketchybar/plugins/calendar.sh";
300 source = folder + /plugins/executable_calendar.sh;
301 };
302 plugins_github = {
303 executable = true;
304 target = ".config/sketchybar/plugins/github.sh";
305 source = folder + /plugins/executable_github.sh;
306 };
307 plugins_icon_map = {
308 executable = true;
309 target = ".config/sketchybar/plugins/icon_map.sh";
310 source = folder + /plugins/executable_icon_map.sh;
311 };
312 plugins_space = {
313 executable = true;
314 target = ".config/sketchybar/plugins/space.sh";
315 source = folder + /plugins/executable_space.sh;
316 };
317 plugins_spotify = {
318 executable = true;
319 target = ".config/sketchybar/plugins/spotify.sh";
320 source = folder + /plugins/executable_spotify.sh;
321 };
322 plugins_volume = {
323 executable = true;
324 target = ".config/sketchybar/plugins/volume.sh";
325 text = ''
326 #!/usr/bin/env sh
327 WIDTH=100
328
329 volume_change() {
330 # INITIAL_WIDTH=$(${pkgs.sketchybar}/bin/sketchybar --query $NAME | ${pkgs.jq}/bin/jq ".icon.width")
331 # if [ "$INITIAL_WIDTH" -eq "0" ]; then
332 # ${pkgs.sketchybar}/bin/sketchybar --animate tanh 30 --set $NAME width=$WIDTH icon.width=$INFO
333 # else
334 # ${pkgs.sketchybar}/bin/sketchybar --set $NAME icon.width=$INFO width=$WIDTH
335 # fi
336 ${pkgs.sketchybar}/bin/sketchybar --set $NAME icon.width=$INFO
337
338
339 # sleep 5
340 # FINAL_WIDTH=$(${pkgs.sketchybar}/bin/sketchybar --query $NAME | ${pkgs.jq}/bin/jq ".icon.width")
341 # if [ "$FINAL_WIDTH" -eq "$INFO" ]; then
342 # ${pkgs.sketchybar}/bin/sketchybar --animate tanh 30 --set $NAME width=0 icon.width=0
343 # fi
344 }
345
346 case "$SENDER" in
347 "volume_change") volume_change
348 ;;
349 esac
350 '';
351 };
352 plugins_volume_click = {
353 executable = true;
354 target = ".config/sketchybar/plugins/volume_click.sh";
355 text = ''
356 #!/usr/bin/env sh
357 MUTED=$(osascript -e 'output muted of (get volume settings)')
358 if [ "$MUTED" = "false" ]; then
359 osascript -e 'set volume output muted true'
360 else
361 osascript -e 'set volume output muted false'
362 fi
363 '';
364 };
365 plugins_zen = {
366 executable = true;
367 target = ".config/sketchybar/plugins/zen.sh";
368 source = folder + /plugins/executable_zen.sh;
369 };
370 plugins_aerospace = {
371 executable = true;
372 target = ".config/sketchybar/plugins/aerospace.sh";
373 text = ''
374 #!/usr/bin/env bash
375 source "$HOME/.config/sketchybar/colors.sh" # Loads all defined colors
376
377 highlight_focused_workspace() {
378 if [[ "$1" = "$FOCUSED_WORKSPACE" ]]
379 then
380 ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME icon.highlight=on label.width=0
381 else
382 ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME icon.highlight=off label.width=dynamic
383 fi
384 }
385
386 illuminate_mode() {
387 if [[ "$mode" = "service" ]]
388 then
389 ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$ORANGE
390 elif [[ "$mode" = "resize" ]]
391 then
392 ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$GREEN
393 else
394 ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$BACKGROUND_1
395 fi
396 }
397 case "$SENDER" in
398 "aerospace_workspace_change")
399 highlight_focused_workspace $1
400 ;;
401 "aerospace_mode_change")
402 illuminate_mode
403 ;;
404 esac
405 '';
406 };
407 };
408}
modules/macos/icons.nix+8-8
...@@ -2,17 +2,18 @@...@@ -2,17 +2,18 @@
2 lib,2 lib,
3 config,3 config,
4 ...4 ...
5}: let5}:
6let
6 cfg = config.environment.customIcons;7 cfg = config.environment.customIcons;
7 inherit8 inherit (lib)
8 (lib)
9 mkEnableOption9 mkEnableOption
10 mkIf10 mkIf
11 mkMerge11 mkMerge
12 mkOption12 mkOption
13 types13 types
14 ;14 ;
15in {15in
16{
16 options.environment.customIcons = {17 options.environment.customIcons = {
17 enable = mkEnableOption "environment.customIcons";18 enable = mkEnableOption "environment.customIcons";
18 clearCacheOnActivation = mkEnableOption "environment.customIcons.clearCacheOnActivation";19 clearCacheOnActivation = mkEnableOption "environment.customIcons.clearCacheOnActivation";
...@@ -21,8 +22,8 @@ in {...@@ -21,8 +22,8 @@ in {
21 type = types.listOf (22 type = types.listOf (
22 types.submodule {23 types.submodule {
23 options = {24 options = {
24 path = mkOption {type = types.path;};25 path = mkOption { type = types.path; };
25 icon = mkOption {type = types.path;};26 icon = mkOption { type = types.path; };
26 };27 };
27 }28 }
28 );29 );
...@@ -46,8 +47,7 @@ in {...@@ -46,8 +47,7 @@ in {
46 set imageData to (current application's NSImage's alloc()'s initWithContentsOfFile:iconPath)47 set imageData to (current application's NSImage's alloc()'s initWithContentsOfFile:iconPath)
47 (current application's NSWorkspace's sharedWorkspace()'s setIcon:imageData forFile:destPath options:2)48 (current application's NSWorkspace's sharedWorkspace()'s setIcon:imageData forFile:destPath options:2)
48 EOF49 EOF
49 '')50 '') cfg.icons
50 cfg.icons
51 ))51 ))
52 }52 }
5353
modules/macos/mac-app-store.nix+6-5
...@@ -3,7 +3,8 @@...@@ -3,7 +3,8 @@
3 lib,3 lib,
4 pkgs,4 pkgs,
5 ...5 ...
6}: let6}:
7let
7 types = lib.types;8 types = lib.types;
89
9 # Mapping of Mac App Store applications.10 # Mapping of Mac App Store applications.
...@@ -23,12 +24,13 @@...@@ -23,12 +24,13 @@
2324
24 # the resolved configuration from the user25 # the resolved configuration from the user
25 masApps = config.shared.darwin.macAppStoreApps;26 masApps = config.shared.darwin.macAppStoreApps;
26in {27in
28{
27 options = {29 options = {
28 # Installs Mac Applications via name using homebrew.30 # Installs Mac Applications via name using homebrew.
29 shared.darwin.macAppStoreApps = lib.mkOption {31 shared.darwin.macAppStoreApps = lib.mkOption {
30 type = types.listOf types.str;32 type = types.listOf types.str;
31 default = [];33 default = [ ];
32 };34 };
33 };35 };
34 config = lib.mkIf (builtins.length masApps > 0) {36 config = lib.mkIf (builtins.length masApps > 0) {
...@@ -37,8 +39,7 @@ in {...@@ -37,8 +39,7 @@ in {
37 builtins.map (name: {39 builtins.map (name: {
38 inherit name;40 inherit name;
39 value = allMasApps.${name};41 value = allMasApps.${name};
40 })42 }) masApps
41 masApps
42 );43 );
43 };44 };
44}45}
modules/macos/system.nix+28-9
...@@ -3,9 +3,11 @@...@@ -3,9 +3,11 @@
3 pkgs,3 pkgs,
4 lib,4 lib,
5 ...5 ...
6}: let6}:
7let
7 tiling = config.shared.darwin.tiling.enable;8 tiling = config.shared.darwin.tiling.enable;
8in {9in
10{
9 # Use touchid or watch to activate sudo11 # Use touchid or watch to activate sudo
10 security.pam.services.sudo_local = {12 security.pam.services.sudo_local = {
11 enable = true;13 enable = true;
...@@ -59,6 +61,10 @@ in {...@@ -59,6 +61,10 @@ in {
5961
60 # Autohide menu bar for tiling window manager62 # Autohide menu bar for tiling window manager
61 _HIHideMenuBar = tiling;63 _HIHideMenuBar = tiling;
64
65 # Use the expanded save dialog by default
66 NSNavPanelExpandedStateForSaveMode = true;
67 NSNavPanelExpandedStateForSaveMode2 = true;
62 };68 };
63 # minimal dock69 # minimal dock
64 dock = {70 dock = {
...@@ -84,18 +90,31 @@ in {...@@ -84,18 +90,31 @@ in {
84 AppleShowAllExtensions = true;90 AppleShowAllExtensions = true;
85 ShowPathbar = true;91 ShowPathbar = true;
86 FXEnableExtensionChangeWarning = false;92 FXEnableExtensionChangeWarning = false;
87 # TODO: default to list view and not saving .DS_Store93 FXPreferredViewStyle = "Nlsv"; # List View
94 ShowExternalHardDrivesOnDesktop = false;
95 ShowHardDrivesOnDesktop = false;
96 ShowRemovableMediaOnDesktop = false;
97 NewWindowTarget = "Home";
88 };98 };
89 CustomSystemPreferences = {99 CustomSystemPreferences = {
100 NSGlobalDomain = {
101 NSStatusItemSelectionPadding = 1;
102 NSStatusItemSelectionSpacing = 1;
103 };
90 "com.apple.universalaccess" = {104 "com.apple.universalaccess" = {
91 closeViewTrackpadGestureZoomEnabled = 1;105 closeViewTrackpadGestureZoomEnabled = 1;
106 # TODO: enable zoom. this doesn't do enough
107 };
108 "com.apple.desktopservices" = {
109 # Prevents the Finder from reading DS_Store files on network
110 # shares, potentially. See https://support.apple.com/en-us/102064
111 DSDontWriteNetworkStores = 1;
112 };
113 "com.apple.dock" = {
114 workspaces-edge-delay = 0.15;
92 };115 };
93 "com.apple.symbolichotkeys" = {116 "com.apple.CrashReporter" = {
94 AppleSymbolicHotKeys = {117 DialogType = "developer"; # display crash reports when apps crash.
95 "64" = {
96 enabled = false;
97 };
98 };
99 };118 };
100 };119 };
101 };120 };
modules/macos/tiling/aerospace.nix+41-13
...@@ -2,7 +2,8 @@...@@ -2,7 +2,8 @@
2 config,2 config,
3 pkgs,3 pkgs,
4 ...4 ...
5}: {5}:
6{
6 services.aerospace = {7 services.aerospace = {
7 enable = config.shared.darwin.tiling.enable;8 enable = config.shared.darwin.tiling.enable;
8 settings = {9 settings = {
...@@ -85,8 +86,8 @@...@@ -85,8 +86,8 @@
85 alt-shift-8 = "move-node-to-workspace 8";86 alt-shift-8 = "move-node-to-workspace 8";
86 alt-shift-9 = "move-node-to-workspace 9";87 alt-shift-9 = "move-node-to-workspace 9";
8788
88 cmd-h = []; # Disable "hide application"89 cmd-h = [ ]; # Disable "hide application"
89 cmd-alt-h = []; # Disable "hide others"90 cmd-alt-h = [ ]; # Disable "hide others"
9091
91 # # See: https://nikitabobko.github.io/AeroSpace/commands#workspace-back-and-forth92 # # See: https://nikitabobko.github.io/AeroSpace/commands#workspace-back-and-forth
92 # alt-tab = "workspace-back-and-forth";93 # alt-tab = "workspace-back-and-forth";
...@@ -97,22 +98,49 @@...@@ -97,22 +98,49 @@
97 alt-shift-semicolon = "mode service";98 alt-shift-semicolon = "mode service";
98 };99 };
99 mode.service.binding = {100 mode.service.binding = {
100 esc = ["reload-config" "mode main"];101 esc = [
101 r = ["flatten-workspace-tree" "mode main"]; # reset layout102 "reload-config"
102 f = ["layout floating tiling" "mode main"]; # Toggle between floating and tiling layout103 "mode main"
103 backspace = ["close-all-windows-but-current" "mode main"];104 ];
105 r = [
106 "flatten-workspace-tree"
107 "mode main"
108 ]; # reset layout
109 f = [
110 "layout floating tiling"
111 "mode main"
112 ]; # Toggle between floating and tiling layout
113 backspace = [
114 "close-all-windows-but-current"
115 "mode main"
116 ];
104117
105 # sticky is not yet supported https://github.com/nikitabobko/AeroSpace/issues/2118 # sticky is not yet supported https://github.com/nikitabobko/AeroSpace/issues/2
106 #s = ["layout sticky tiling", "mode main"]119 #s = ["layout sticky tiling", "mode main"]
107120
108 alt-shift-h = ["join-with left" "mode main"];121 alt-shift-h = [
109 alt-shift-j = ["join-with down" "mode main"];122 "join-with left"
110 alt-shift-k = ["join-with up" "mode main"];123 "mode main"
111 alt-shift-l = ["join-with right" "mode main"];124 ];
125 alt-shift-j = [
126 "join-with down"
127 "mode main"
128 ];
129 alt-shift-k = [
130 "join-with up"
131 "mode main"
132 ];
133 alt-shift-l = [
134 "join-with right"
135 "mode main"
136 ];
112137
113 down = "volume down";138 down = "volume down";
114 up = "volume up";139 up = "volume up";
115 shift-down = ["volume set 0" "mode main"];140 shift-down = [
141 "volume set 0"
142 "mode main"
143 ];
116 };144 };
117 after-startup-command = [145 after-startup-command = [
118 "exec-and-forget sketchybar"146 "exec-and-forget sketchybar"
...@@ -131,7 +159,7 @@...@@ -131,7 +159,7 @@
131 "if" = {159 "if" = {
132 app-id = "com.mitchellh.ghostty";160 app-id = "com.mitchellh.ghostty";
133 };161 };
134 run = ["layout floating"];162 run = [ "layout floating" ];
135 check-further-callbacks = true;163 check-further-callbacks = true;
136 }164 }
137 ];165 ];
modules/macos/tiling/default.nix+4-2
...@@ -1,6 +1,8 @@...@@ -1,6 +1,8 @@
1{lib, ...}: let1{ lib, ... }:
2let
2 inherit (lib) types;3 inherit (lib) types;
3in {4in
5{
4 imports = [6 imports = [
5 ./sketchybar.nix7 ./sketchybar.nix
6 ./aerospace.nix8 ./aerospace.nix
modules/macos/tiling/sketchybar.nix+2-1
...@@ -2,7 +2,8 @@...@@ -2,7 +2,8 @@
2 config,2 config,
3 pkgs,3 pkgs,
4 ...4 ...
5}: {5}:
6{
6 services.sketchybar = {7 services.sketchybar = {
7 enable = config.shared.darwin.tiling.enable;8 enable = config.shared.darwin.tiling.enable;
8 package = pkgs.sketchybar;9 package = pkgs.sketchybar;
modules/neovim/default.nix created+140
...@@ -0,0 +1,140 @@
1{
2 config,
3 lib,
4 host,
5 ...
6}:
7{
8 # based on default options from upstream:
9 # https://github.com/NotAShelf/nvf/blob/main/configuration.nix
10 #
11 # a full list of options is available too:
12 # https://notashelf.github.io/nvf/options.html
13 #
14 # override level 999 is used to not conflict with mkDefault as used by nvf.
15 # which allows user configurations to disable/override anything here.
16 vim = lib.mkOverride 999 {
17 theme = {
18 enable = true;
19 };
20 visuals = {
21 # notification system
22 # https://github.com/j-hui/fidget.nvim
23 fidget-nvim.enable = true;
24 # highlight undo / paste / autoformat / macros
25 # https://github.com/tzachar/highlight-undo.nvim
26 highlight-undo.enable = true;
27 # indentation guides
28 # https://github.com/lukas-reineke/indent-blankline.nvim
29 indent-blankline.enable = false;
30 # extra icons
31 nvim-web-devicons.enable = true;
32 # https://github.com/petertriho/nvim-scrollbar
33 nvim-scrollbar.enable = false;
34 };
35 lsp = {
36 # Must be enabled for language modules to hook into the LSP API.
37 enable = true;
38 formatOnSave = true;
39 # show errors inline
40 # https://github.com/folke/trouble.nvim
41 trouble.enable = true;
42 # show lightbulb icon in gutter to indicate code actions
43 # https://github.com/kosayoda/nvim-lightbulb
44 lightbulb.enable = true;
45 # show icons in auto-completion menu
46 # https://github.com/onsails/lspkind.nvim
47 lspkind.enable = config.vim.autocomplete.blink-cmp.enable;
48 };
49 debugger = {
50 nvim-dap = {
51 enable = true;
52 ui.enable = true;
53 };
54 };
55 languages = {
56 enableFormat = true;
57 enableTreesitter = true;
58 enableExtraDiagnostics = true;
59
60 # sort-lines: on
61 assembly.enable = true;
62 bash.enable = true;
63 clang.enable = true;
64 css.enable = true;
65 html.enable = true;
66 nix.enable = true;
67 rust.crates.enable = true;
68 rust.enable = true;
69 ts.enable = true;
70 zig.enable = true;
71 # sort-lines: off
72
73 nix.format.type = "nixfmt"; # looks so much nicer
74 };
75 filetree = {
76 neo-tree = {
77 enable = true;
78 };
79 };
80 tabline = {
81 nvimBufferline.enable = true;
82 };
83 autocomplete = {
84 blink-cmp.enable = true;
85 };
86 statusline = {
87 lualine = {
88 enable = true;
89 refresh = {
90 statusline = 100;
91 tabline = 100;
92 winbar = 100;
93 };
94 };
95 };
96 binds = {
97 whichKey.enable = true;
98 cheatsheet.enable = true;
99 # discourages bad keyboard habit, e.g. disables arrow keys, explains better binds
100 # https://github.com/m4xshen/hardtime.nvim
101 hardtime-nvim.enable = true;
102 hardtime-nvim.setupOpts = {
103 disable_mouse = false;
104 restriction_mode = "hint"; # default behavior is lenient
105 };
106 };
107 ui = {
108 borders.enable = true;
109 # https://github.com/norcalli/nvim-colorizer.lua
110 colorizer.enable = true;
111 # https://github.com/RRethy/vim-illuminate
112 illuminate.enable = true;
113 breadcrumbs = {
114 enable = false;
115 navbuddy.enable = config.vim.ui.breadcrumbs.enable;
116 };
117 smartcolumn = {
118 enable = true;
119 setupOpts.custom_colorcolumn = {
120 # this is a freeform module, it's `buftype = int;` for configuring column position
121 nix = "110";
122 ruby = "120";
123 java = "130";
124 go = [
125 "90"
126 "130"
127 ];
128 };
129 };
130 };
131 notes = {
132 todo-comments.enable = true;
133 };
134 git = {
135 enable = true;
136 gitsigns.enable = true;
137 gitsigns.codeActions.enable = false; # throws an annoying debug message
138 };
139 };
140}
modules/nixos/boot.nix+2-1
...@@ -1,4 +1,5 @@...@@ -1,4 +1,5 @@
1{pkgs, ...}: {1{ pkgs, ... }:
2{
2 boot = {3 boot = {
3 kernelPackages = pkgs.linuxPackages_latest; # _zen, _hardened, _rt, _rt_latest, etc.4 kernelPackages = pkgs.linuxPackages_latest; # _zen, _hardened, _rt, _rt_latest, etc.
4 loader = {5 loader = {
modules/nixos/default.nix+9-4
...@@ -1,4 +1,9 @@...@@ -1,4 +1,9 @@
1{ lib, pkgs, ... }: {1{
2 lib,
3 pkgs,
4 ...
5}:
6{
2 imports = [7 imports = [
3 ./boot.nix8 ./boot.nix
4 ./ld.nix9 ./ld.nix
...@@ -7,8 +12,8 @@...@@ -7,8 +12,8 @@
7 ];12 ];
8 # make 'shared.darwin' not an error to define.13 # make 'shared.darwin' not an error to define.
9 options.shared.darwin = lib.mkOption {14 options.shared.darwin = lib.mkOption {
10 type = lib.types.anything;15 type = lib.types.anything;
11 default = {};16 default = { };
12 description = "no-op on linux";17 description = "no-op on linux";
13 };18 };
14}19}
modules/nixos/ld.nix+2-1
...@@ -1,4 +1,5 @@...@@ -1,4 +1,5 @@
1{pkgs, ...}: {1{ pkgs, ... }:
2{
2 programs.nix-ld.enable = true;3 programs.nix-ld.enable = true;
34
4 # "minimum" amount of libraries needed for most games to run without steam-run5 # "minimum" amount of libraries needed for most games to run without steam-run
modules/nixos/nvidia.nix+7-5
...@@ -2,10 +2,12 @@...@@ -2,10 +2,12 @@
2 pkgs,2 pkgs,
3 config,3 config,
4 ...4 ...
5}: let5}:
6let
6 nvidiaDriverChannel = config.boot.kernelPackages.nvidiaPackages.latest;7 nvidiaDriverChannel = config.boot.kernelPackages.nvidiaPackages.latest;
7in {8in
8 services.xserver.videoDrivers = ["nvidia"];9{
10 services.xserver.videoDrivers = [ "nvidia" ];
911
10 nixpkgs.config = {12 nixpkgs.config = {
11 nvidia.acceptLicense = true;13 nvidia.acceptLicense = true;
...@@ -18,7 +20,7 @@ in {...@@ -18,7 +20,7 @@ in {
18 ];20 ];
1921
20 # Blacklist nouveau to avoid conflicts22 # Blacklist nouveau to avoid conflicts
21 boot.blacklistedKernelModules = ["nouveau"];23 boot.blacklistedKernelModules = [ "nouveau" ];
22 environment.variables = {24 environment.variables = {
23 LIBVA_DRIVER_NAME = "nvidia"; # Hardware video acceleration25 LIBVA_DRIVER_NAME = "nvidia"; # Hardware video acceleration
24 XDG_SESSION_TYPE = "wayland"; # Force Wayland26 XDG_SESSION_TYPE = "wayland"; # Force Wayland
...@@ -80,7 +82,7 @@ in {...@@ -80,7 +82,7 @@ in {
80 };82 };
8183
82 nix.settings = {84 nix.settings = {
83 substituters = ["https://cuda-maintainers.cachix.org"];85 substituters = [ "https://cuda-maintainers.cachix.org" ];
84 trusted-public-keys = [86 trusted-public-keys = [
85 "cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="87 "cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
86 ];88 ];
modules/nixos/services.nix+4-3
...@@ -1,4 +1,5 @@...@@ -1,4 +1,5 @@
1{pkgs, ...}: {1{ pkgs, ... }:
2{
2 services = {3 services = {
3 avahi = {4 avahi = {
4 enable = true;5 enable = true;
...@@ -39,7 +40,7 @@...@@ -39,7 +40,7 @@
39 # Enable CUPS to print documents.40 # Enable CUPS to print documents.
40 printing = {41 printing = {
41 enable = true;42 enable = true;
42 drivers = [pkgs.brlaser]; # Brother printer driver43 drivers = [ pkgs.brlaser ]; # Brother printer driver
43 };44 };
4445
45 pipewire = {46 pipewire = {
...@@ -54,7 +55,7 @@...@@ -54,7 +55,7 @@
5455
55 openssh = {56 openssh = {
56 enable = true;57 enable = true;
57 ports = [22];58 ports = [ 22 ];
58 settings = {59 settings = {
59 PasswordAuthentication = true;60 PasswordAuthentication = true;
60 UseDns = true;61 UseDns = true;
modules/nixvim/default.nix deleted-96
...@@ -1,96 +0,0 @@
1{
2 pkgs,
3 inputs,
4 nixvim,
5 ...
6}: {
7 imports = [
8 ./opts.nix
9 ./keymaps.nix
10 ./plugins
11 ];
12 programs.nixvim = {
13 enable = true;
14
15 globals = {
16 #Set leader to space, and localleader to \
17 mapleader = " ";
18 maplocalleader = "\\";
19
20 have_nerd_font = true;
21 };
22
23 clipboard = {
24 providers = {
25 wl-copy.enable = true; # For Wayland
26 xsel.enable = true; # For X11
27 };
28
29 # Sync clipboard between OS and Neovim
30 # Remove this option if you want your OS clipboard to remain independent.
31 register = "unnamedplus";
32 };
33
34 opts = {
35 # Show line numbers
36 number = true;
37 # You can also add relative line numbers, to help with jumping.
38 # Experiment for yourself to see if you like it!
39 #relativenumber = true
40
41 # Enable mouse mode, can be useful for resizing splits for example!
42 mouse = "a";
43
44 # Don't show the mode, since it's already in the statusline
45 showmode = false;
46
47 # Enable break indent
48 breakindent = true;
49
50 # Save undo history
51 undofile = true;
52
53 # Case-insensitive searching UNLESS \C or one or more capital letters in the search term
54 ignorecase = true;
55 smartcase = true;
56
57 # Keep signcolumn on by default
58 signcolumn = "yes";
59
60 # Decrease update time
61 updatetime = 250;
62
63 # Decrease mapped sequence wait time
64 # Displays which-key popup sooner
65 timeoutlen = 300;
66
67 # Configure how new splits should be opened
68 splitright = true;
69 splitbelow = true;
70
71 # Sets how neovim will display certain whitespace characters in the editor
72 # See `:help 'list'`
73 # and `:help 'listchars'`
74 list = true;
75 # NOTE: .__raw here means that this field is raw lua code
76 listchars.__raw = "{ tab = '» ', trail = '·', nbsp = '␣' }";
77
78 # Preview substitutions live, as you type!
79 inccommand = "split";
80
81 # Show which line your cursor is on
82 cursorline = true;
83
84 # Minimal number of screen lines to keep above and below the cursor.
85 scrolloff = 10;
86
87 # if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
88 # instead raise a dialog asking if you wish to save the current file(s)
89 # See `:help 'confirm'`
90 confirm = true;
91
92 # See `:help hlsearch`
93 hlsearch = true;
94 };
95 };
96}
modules/nixvim/icons.nix deleted-189
...@@ -1,189 +0,0 @@
1{lib, ...}: {
2 options.nvix.icons = lib.mkOption {
3 type = lib.types.attrs;
4 default = {};
5 };
6 config.nvix.icons = {
7 kind = {
8 Array = "";
9 Boolean = "";
10 Class = "";
11 Color = "";
12 Constant = "";
13 Constructor = "";
14 Enum = "";
15 EnumMember = "";
16 Event = "";
17 Field = "";
18 File = "";
19 Folder = "";
20 Function = "";
21 Interface = "";
22 Key = "";
23 Keyword = "";
24 Method = "";
25 Module = "";
26 Namespace = "";
27 Null = "ﳠ";
28 Number = "";
29 Object = "";
30 Operator = "";
31 Package = "";
32 Property = "";
33 Reference = "";
34 Snippet = "";
35 String = "";
36 Struct = "";
37 Text = "";
38 TypeParameter = "";
39 Unit = "";
40 Value = "";
41 Variable = "";
42 Copilot = "";
43 TabNine = "⌬";
44 };
45 git = {
46 LineAdded = "";
47 LineModified = "";
48 LineRemoved = "";
49 FileDeleted = "";
50 FileIgnored = "󰫙";
51 FileRenamed = "";
52 FileStaged = "✓";
53 FileUnmerged = "";
54 FileMerged = "";
55 FileUnstaged = "";
56 FileUntracked = "◌";
57 FileChanged = "󰉺";
58 Copied = "󰆏";
59 Ignored = "";
60 Diff = "";
61 Repo = "";
62 Octoface = "";
63 Branch = "";
64 };
65 ui = {
66 lazy = {
67 ft = "";
68 lazy = "󰂠 ";
69 loaded = "";
70 not_loaded = "";
71 };
72 ArrowCircleDown = "";
73 ArrowCircleLeft = "";
74 ArrowCircleRight = "";
75 ArrowCircleUp = "";
76 BoldArrowDown = "";
77 BoldArrowLeft = "";
78 BoldArrowRight = "";
79 BoldArrowUp = "";
80 BoldClose = "";
81 BoldDividerLeft = "";
82 BoldDividerRight = "";
83 BoldLineLeft = "▎";
84 BookMark = "";
85 BoxChecked = "";
86 Bug = "";
87 Stacks = "";
88 Scopes = "";
89 Watches = "";
90 DebugConsole = "";
91 Calendar = "";
92 Check = "";
93 ChevronRight = ">";
94 ChevronShortDown = "";
95 ChevronShortLeft = "";
96 ChevronShortRight = "";
97 ChevronShortUp = "";
98 Circle = "";
99 Close = "";
100 CloudDownload = "";
101 Code = "";
102 Comment = "";
103 Dashboard = "";
104 DividerLeft = "";
105 DividerRight = "";
106 DoubleChevronRight = "»";
107 Ellipsis = "";
108 EmptyFolder = "";
109 EmptyFolderOpen = "";
110 ExitCircle = "󰿅";
111 File = "";
112 FileSymlink = "";
113 Files = "";
114 FileRename = "";
115 FindFile = "󰈞";
116 FindText = "";
117 Fire = "";
118 Folder = "";
119 FolderOpen = "";
120 FolderSymlink = "";
121 Forward = "";
122 Gear = "";
123 History = "";
124 Lightbulb = "";
125 LineLeft = "▏";
126 LineMiddle = "│";
127 List = "";
128 Lock = "";
129 NewFile = "";
130 Note = "";
131 Package = "";
132 Pencil = "󰏫";
133 Plus = "";
134 Project = "";
135 Search = "";
136 SignIn = "";
137 SignOut = "";
138 Tab = "";
139 Table = "";
140 Target = "󰀘";
141 Telescope = "";
142 Text = "";
143 Tree = "";
144 Triangle = "󰐊";
145 TriangleShortArrowDown = "";
146 TriangleShortArrowLeft = "";
147 TriangleShortArrowRight = "";
148 TriangleShortArrowUp = "";
149 };
150 diagnostics = {
151 BoldError = "";
152 Error = "";
153 BoldWarning = "";
154 Warning = "";
155 BoldInformation = "";
156 Information = "";
157 BoldQuestion = "";
158 Question = "";
159 BoldHint = "";
160 Hint = "󰌶";
161 Debug = "";
162 Trace = "✎";
163 };
164 misc = {
165 Robot = "ﮧ";
166 Squirrel = "";
167 Tag = "";
168 Watch = "";
169 Smiley = "";
170 Package = "";
171 CircuitBoard = "";
172 LualineFmt = "";
173 };
174 nvtree_chad = {
175 default = "󰈚";
176 symlink = "";
177 folder = {
178 default = "";
179 empty = "";
180 empty_open = "";
181 open = "";
182 symlink = "";
183 symlink_open = "";
184 arrow_open = "";
185 arrow_closed = "";
186 };
187 };
188 };
189}
modules/nixvim/keymaps.nix deleted-42
...@@ -1,42 +0,0 @@
1{pkgs, ...}: {
2 programs.nixvim = {
3 keymaps = [
4 # Keybinds to make split navigation easier.
5 # Use CTRL+<hjkl> to switch between windows
6 #
7 # See `:help wincmd` for a list of all window commands
8 {
9 mode = "n";
10 key = "<C-h>";
11 action = "<C-w><C-h>";
12 options = {
13 desc = "Move focus to the left window";
14 };
15 }
16 {
17 mode = "n";
18 key = "<C-l>";
19 action = "<C-w><C-l>";
20 options = {
21 desc = "Move focus to the right window";
22 };
23 }
24 {
25 mode = "n";
26 key = "<C-j>";
27 action = "<C-w><C-j>";
28 options = {
29 desc = "Move focus to the lower window";
30 };
31 }
32 {
33 mode = "n";
34 key = "<C-k>";
35 action = "<C-w><C-k>";
36 options = {
37 desc = "Move focus to the upper window";
38 };
39 }
40 ];
41 };
42}
modules/nixvim/opts.nix deleted-65
...@@ -1,65 +0,0 @@
1{pkgs, ...}: {
2 programs.nixvim = {
3 opts = {
4 # Show line numbers
5 number = true;
6 relativenumber = true;
7
8 shiftwidth = 2;
9
10 # Enable mouse mode, can be useful for resizing splits for example!
11 mouse = "a";
12
13 # Don't show the mode, since it's already in the statusline
14 showmode = false;
15
16 # Enable break indent
17 breakindent = true;
18
19 # Save undo history
20 undofile = true;
21
22 # Case-insensitive searching UNLESS \C or one or more capital letters in the search term
23 ignorecase = true;
24 smartcase = true;
25
26 # Keep signcolumn on by default
27 signcolumn = "yes";
28
29 # Decrease update time
30 updatetime = 250;
31
32 # Decrease mapped sequence wait time
33 # Displays which-key popup sooner
34 timeoutlen = 300;
35
36 # Configure how new splits should be opened
37 splitright = true;
38 splitbelow = true;
39
40 # Sets how neovim will display certain whitespace characters in the editor
41 # See `:help 'list'`
42 # and `:help 'listchars'`
43 list = true;
44 # NOTE: .__raw here means that this field is raw lua code
45 listchars.__raw = "{ tab = '» ', trail = '·', nbsp = '␣' }";
46
47 # Preview substitutions live, as you type!
48 inccommand = "split";
49
50 # Show which line your cursor is on
51 cursorline = true;
52
53 # Minimal number of screen lines to keep above and below the cursor.
54 scrolloff = 10;
55
56 # if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
57 # instead raise a dialog asking if you wish to save the current file(s)
58 # See `:help 'confirm'`
59 confirm = true;
60
61 # See `:help hlsearch`
62 hlsearch = true;
63 };
64 };
65}
modules/nixvim/plugins/blink.nix deleted-69
...@@ -1,69 +0,0 @@
1{
2 lib,
3 pkgs,
4 ...
5}: {
6 programs.nixvim = {
7 extraPackages = with pkgs; [
8 gh
9 wordnet
10 glab
11 ];
12
13 extraPlugins = [
14 ];
15
16 plugins = {
17 blink-cmp = {
18 enable = true;
19
20 lazyLoad.settings.event = [
21 "InsertEnter"
22 "CmdlineEnter"
23 ];
24
25 settings = {
26 keymap.preset = "super-tab";
27 completion = {
28 accept.auto_brackets.enabled = false;
29 ghost_test.enabled = false;
30
31 list.selection = {
32 preselect = true;
33 auto_insert = false;
34 };
35
36 documentation = {
37 auto_show = true;
38
39 window.border = "rounded";
40 };
41 };
42
43 menu.draw.components = {
44 kind_icon.text.__raw = ''
45 function(ctx)
46 local kind_icon, _, _ = require('mini.icons').get('lsp', ctx.kind)
47 -- Check for both nil and the default fallback icon
48 if not kind_icon or kind_icon == '󰞋' then
49 -- Use our configured kind_icons
50 return require('blink.cmp.config').appearance.kind_icons[ctx.kind] or ""
51 end
52 return kind_icon
53 end,
54 -- Optionally, you may also use the highlights from mini.icons
55 highlight = function(ctx)
56 local _, hl, _ = require('mini.icons').get('lsp', ctx.kind)
57 return hl
58 end
59 '';
60 };
61 };
62
63 fuzzy = {
64 implementation = "prefer_rust_with_warning";
65 };
66 };
67 };
68 };
69}
modules/nixvim/plugins/default.nix deleted-6
...@@ -1,6 +0,0 @@
1{pkgs, ...}: {
2 imports = [
3 ./blink.nix
4 ./lz-n.nix
5 ];
6}
modules/nixvim/plugins/lz-n.nix deleted-7
...@@ -1,7 +0,0 @@
1{pkgs, ...}: {
2 programs.nixvim.plugins = {
3 lz-n = {
4 enable = true;
5 };
6 };
7}
modules/shared/default.nix+7-1
...@@ -1,9 +1,15 @@...@@ -1,9 +1,15 @@
1# shared is used by nixos-rebuild and darwin-rebuild1# shared is used by nixos-rebuild and darwin-rebuild
2{pkgs, ...}: {2{ pkgs, ... }:
3{
3 imports = [4 imports = [
4 # sort-lines:start5 # sort-lines:start
5 ./user-system-settings.nix6 ./user-system-settings.nix
6 ./nix.nix7 ./nix.nix
7 # sort-lines:end8 # sort-lines:end
8 ];9 ];
10 # install neovim globally, but let home-manager install
11 # the per-user configured one.
12 environment.systemPackages = [
13 pkgs.neovim
14 ];
9}15}
modules/shared/nix.nix+7-3
...@@ -1,10 +1,11 @@...@@ -1,10 +1,11 @@
1{inputs, ...}: {1{ inputs, ... }:
2{
2 nixpkgs.config = {3 nixpkgs.config = {
3 allowUnfree = true;4 allowUnfree = true;
4 };5 };
56
6 nix = {7 nix = {
7 nixPath = ["nixpkgs = ${inputs.nixpkgs}"];8 nixPath = [ "nixpkgs = ${inputs.nixpkgs}" ];
8 extraOptions = ''9 extraOptions = ''
9 warn-dirty = false10 warn-dirty = false
10 '';11 '';
...@@ -14,7 +15,10 @@...@@ -14,7 +15,10 @@
14 };15 };
1516
16 settings = {17 settings = {
17 experimental-features = ["nix-command" "flakes"];18 experimental-features = [
19 "nix-command"
20 "flakes"
21 ];
18 substituters = [22 substituters = [
19 "https://cache.nixos.org/?priority=10"23 "https://cache.nixos.org/?priority=10"
2024
modules/shared/user-system-settings.nix+5-3
...@@ -1,10 +1,12 @@...@@ -1,10 +1,12 @@
1# applies user settings for the system1# applies user settings for the system
2{2{
3 config,
3 pkgs,4 pkgs,
4 user,5 user,
5 lib,6 lib,
6 ...7 ...
7}: {8}:
9{
8 # Set your time zone.10 # Set your time zone.
9 time.timeZone = user.timeZone;11 time.timeZone = user.timeZone;
1012
...@@ -17,8 +19,8 @@...@@ -17,8 +19,8 @@
17 BROWSER = user.browser;19 BROWSER = user.browser;
18 };20 };
1921
20 stylix = {22 stylix = lib.mkIf (user ? "theme" && user.theme != null) {
21 enable = user ? "theme";23 enable = false;
22 base16Scheme = "${pkgs.base16-schemes}/share/themes/${user.theme}.yaml";24 base16Scheme = "${pkgs.base16-schemes}/share/themes/${user.theme}.yaml";
2325
24 fonts = lib.optionalAttrs (user ? "font") {26 fonts = lib.optionalAttrs (user ? "font") {
nvim created+13
...@@ -0,0 +1,13 @@
1#!/bin/sh
2username="$(id -u -n)"
3if [ "$username" = "clo" ]; then
4 name="chloe";
5elif [ "$username" = "nmarks" ]; then
6 name="natalie";
7fi
8if [ -z "$name" ]; then
9 echo "Configure this wrapper script with your name." >2
10 exit 1
11fi
12exec nix run ".#nvim-$name" -- "$@"
13
readme.md+12-8
...@@ -1,13 +1,14 @@...@@ -1,13 +1,14 @@
1# nix config1# nix config
22
3this setup allows natalie and chloe to share common configuration between their machines, but also share useful modules between each other.3this setup allows natalie and chloe to share common configuration between their
4machines, but also share useful modules between each other.
45
5```6```
6lib/ # reusable functions7lib/ # reusable functions
7modules/ # reusable modules8modules/ # reusable modules
8 +-- macos/ # nix-darwin configurations9 +-- macos/ # nix-darwin configurations
9 +-- nixos/ # linux configurations10 +-- nixos/ # linux configurations
10 +-- nixvim/ # neovim configurations11 +-- neovim/ # nvf configurations
11 +-- shared/ # shared between nixos-rebuild & darwin-rebuild12 +-- shared/ # shared between nixos-rebuild & darwin-rebuild
12 +-- home-manager.nix # home program presets13 +-- home-manager.nix # home program presets
13users/14users/
...@@ -15,6 +16,7 @@ users/...@@ -15,6 +16,7 @@ users/
15 | +-- user.nix # info about her16 | +-- user.nix # info about her
16 | +-- configuration.nix # for all hosts17 | +-- configuration.nix # for all hosts
17 | +-- home.nix # for all hosts18 | +-- home.nix # for all hosts
19 | +-- vim.nix # for neovim
18 | +-- sandwich/20 | +-- sandwich/
19 | | +-- configuration.nix # per host21 | | +-- configuration.nix # per host
20 | | +-- home.nix22 | | +-- home.nix
...@@ -25,7 +27,8 @@ users/...@@ -25,7 +27,8 @@ users/
25 ...27 ...
26```28```
2729
28A new machine can be added by adding a new definition in `flake.nix`. Note that the user and host `configuration.nix` and `home.nix` files are 30A new machine can be added by adding a new definition in `flake.nix`. Note that
31the user and host `configuration.nix` and `home.nix` files are
2932
30## macOS installation instructions33## macOS installation instructions
3134
...@@ -40,11 +43,12 @@ While this installs, now is a good time to perform manual setup steps:...@@ -40,11 +43,12 @@ While this installs, now is a good time to perform manual setup steps:
4043
41- Setup your SSH keys in `~/.ssh`44- Setup your SSH keys in `~/.ssh`
42- Configure the device hostname in System Settings in45- Configure the device hostname in System Settings in
43 - About -> Name46 - About -> Name
44 - General -> Sharing -> Local Hostname47 - General -> Sharing -> Local Hostname
45- Make sure you're logged into iCloud / Mac App Store48- Make sure you're logged into iCloud / Mac App Store
46- `xcode-select --install` to make sure Git and other utilities are available.49- `xcode-select --install` to make sure Git and other utilities are available.
47- Optional: Disable app verification with `sudo spctl --master-disable`, then, go to System Settings -> Privacy to allow unsigned apps.50- Optional: Disable app verification with `sudo spctl --master-disable`, then,
51 go to System Settings -> Privacy to allow unsigned apps.
4852
49Once Nix is installed, open a new shell and clone the repository:53Once Nix is installed, open a new shell and clone the repository:
5054
...@@ -55,11 +59,11 @@ git clone https://git.paperclover.net/clo/config.git...@@ -55,11 +59,11 @@ git clone https://git.paperclover.net/clo/config.git
55git clone git@git.paperclover.net:clo/config59git clone git@git.paperclover.net:clo/config
56```60```
5761
58The location of the cloned repository must match what is in your `user.nix` file. 62The location of the cloned repository must match what is in your `user.nix`
63file.
5964
60Setup `nix-darwin` using the `switch` helper:65Setup `nix-darwin` using the `switch` helper:
6166
62```67```
63./switch68./switch
64```69```
65
sample.keys created+9
...@@ -0,0 +1,9 @@
1global {
2 cmd + opt + backtick -> app "Keyboard Maestro"
3}
4
5device WorkLouder {
6 a -> {
7 if app "REAPER" -> key cmd + shift
8 }
9}
users/chloe/configuration.nix+17-2
...@@ -1,9 +1,12 @@...@@ -1,9 +1,12 @@
1# Configuration applied to all of chloe's machines1# Configuration applied to all of chloe's machines
2{ pkgs, ... }: {2{ pkgs, ... }:
3{
3 # packages for all machines4 # packages for all machines
4 environment.systemPackages = with pkgs; [5 environment.systemPackages = with pkgs; [
5 neovim
6 ];6 ];
7 # services for all machines
8 services.karabiner-elements.enable = true;
9
7 # configuration for shared modules.10 # configuration for shared modules.
8 # all custom options in 'shared' for clarity.11 # all custom options in 'shared' for clarity.
9 shared.darwin = {12 shared.darwin = {
...@@ -12,16 +15,28 @@...@@ -12,16 +15,28 @@
12 "magnet"15 "magnet"
13 ];16 ];
14 };17 };
18
15 # system preferences19 # system preferences
16 system.defaults = {20 system.defaults = {
17 NSGlobalDomain = {21 NSGlobalDomain = {
18 KeyRepeat = 1;22 KeyRepeat = 1;
19 InitialKeyRepeat = 10;23 InitialKeyRepeat = 10;
20 };24 };
25 dock = {
26 show-recents = false;
27 };
21 CustomUserPreferences = {28 CustomUserPreferences = {
22 NSGlobalDomain = {29 NSGlobalDomain = {
23 # TODO: how to change system accent color30 # TODO: how to change system accent color
24 AppleHighlightColor = "1.000000 0.874510 0.701961 Orange";31 AppleHighlightColor = "1.000000 0.874510 0.701961 Orange";
32
33 # control how the fn keys operate
34 # 0 = default to media keys, 1 = default to FN1-12
35 "com.apple.keyboard.fnState" = 1;
36
37 NSUserKeyEquivalents = {
38 Minimize = "@~^\\Uf70f"; # set minimize to a stupidly hard key to press
39 };
25 };40 };
26 };41 };
27 };42 };
users/chloe/home.nix+73-11
...@@ -1,24 +1,86 @@...@@ -1,24 +1,86 @@
1{ pkgs, host, ... }:
2let
3 hostServer = false;
4in
1{5{
2 inputs,
3 pkgs,
4 lib,
5 ...
6}: {
7 home = {6 home = {
8 stateVersion = "23.05"; # Please read the comment before changing.7 stateVersion = "23.05"; # Please read the comment before changing.
9 packages = [8 packages =
10 pkgs.neovim9 with pkgs;
11 pkgs.nh10 let
12 pkgs.ffmpeg11 # packages to always install
13 ];12 all = [
13 ffmpeg
14 ripgrep
15 uv
16 nh
17 ];
18 # packages to install for desktop environments (non-server)
19 desktop = [
20 ];
21 # packages to install on all servers
22 server = [ ];
23 # packages to install on macOS desktops
24 darwin = [
25 raycast
26 ];
27 # packages to install on linux desktops
28 linux = [
29 reaper # TODO: why does this break on macOS
30 ];
31 in
32 all ++ (if host.darwin then darwin else linux) ++ (if hostServer then server else desktop);
14 };33 };
15 programs = {34 programs = {
16 # sort-lines:start35 # sort-lines:start
36 bat.enable = true;
37 btop.enable = true;
38 fd.enable = true;
17 hyfetch.enable = true;39 hyfetch.enable = true;
18 zsh.enable = true;
19 # sort-lines:end40 # sort-lines:end
2041
42 # zsh is the shell i use
43 zsh = {
44 enable = true;
45 enableCompletion = true;
46 autosuggestion.enable = true;
47 syntaxHighlighting.enable = true;
48
49 history.size = 10000;
50
51 shellAliases = {
52 switch = "nh darwin switch ~/config";
53 };
54 profileExtra = ''
55 function python() {
56 dirname=$(dirname $1 2>/dev/null)
57 if [ -z "$dirname" ]; then
58 dirname=$(pwd)
59 fi
60 uv run --project "$dirname" "$@"
61 }
62 '';
63 };
64
21 # use a git-specific email65 # use a git-specific email
22 git.userEmail = "git@paperclover.net";66 git.userEmail = "git@paperclover.net";
67
68 ssh = {
69 enable = true;
70 matchBlocks = rec {
71 zenith = {
72 user = "clo";
73 port = 222;
74 };
75 "nas.paperclover.net" = zenith;
76 };
77 };
78 neovide = {
79 enable = !hostServer;
80 settings = {
81 font.normal = "AT Name Mono";
82 font.size = 13;
83 };
84 };
23 };85 };
24}86}
users/chloe/paperback/configuration.nix deleted-5
...@@ -1,5 +0,0 @@
1{pkgs, ...}: {
2 environment.systemPackages = with pkgs; [
3 reaper
4 ];
5}
users/chloe/paperback/home.nix created+17
...@@ -0,0 +1,17 @@
1{ pkgs, ... }:
2{
3 # these programs are not globally installed to reduce distractions.
4 # most of these are needed for my work environment.
5 programs.bun.enable = true;
6 programs.zed-editor.enable = true;
7 home.packages = with pkgs; [
8 doppler
9 nodejs_22
10 rustup
11 typescript
12 pm2
13 pnpm
14 yt-dlp
15 spotdl
16 ];
17}
users/chloe/sandwich/configuration.nix+2-6
...@@ -1,9 +1,5 @@...@@ -1,9 +1,5 @@
1{pkgs, ...}: {1{ pkgs, ... }:
2 environment.systemPackages = with pkgs; [2{
3 ffmpeg
4 ripgrep
5 reaper
6 ];
7 shared.darwin = {3 shared.darwin = {
8 macAppStoreApps = [4 macAppStoreApps = [
9 "final-cut-pro"5 "final-cut-pro"
users/chloe/user.nix+1-1
...@@ -8,7 +8,7 @@...@@ -8,7 +8,7 @@
8 dotfilesDir = "~/config"; # absolute path of the local repo8 dotfilesDir = "~/config"; # absolute path of the local repo
99
10 # Stylix/Theming10 # Stylix/Theming
11 theme = "catppuccin-mocha";11 theme = null;
12 #font12 #font
13 sexuality = "lesbian"; # hyfetch13 sexuality = "lesbian"; # hyfetch
1414
users/chloe/vim.nix created+20
...@@ -0,0 +1,20 @@
1{ ... }:
2{
3 vim.theme.extraConfig = ''
4 if vim.g.neovide then
5 vim.g.neovide_cursor_trail_size = 0.3
6 vim.g.neovide_scroll_animation_length = 0.1;
7
8 vim.keymap.set('n', '<D-s>', ':w<CR>') -- Save
9 vim.keymap.set('v', '<D-c>', '"+y') -- Copy
10 vim.keymap.set('n', '<D-v>', '"+P') -- Paste normal mode
11 vim.keymap.set('v', '<D-v>', '"+P') -- Paste visual mode
12 vim.keymap.set('c', '<D-v>', '<C-R>+') -- Paste command mode
13 vim.keymap.set('i', '<D-v>', '<ESC>l"+Pli') -- Paste insert mode
14 end
15 vim.api.nvim_set_keymap("", '<D-v>', '+p<CR>', { noremap = true, silent = true})
16 vim.api.nvim_set_keymap('!', '<D-v>', '<C-R>+', { noremap = true, silent = true})
17 vim.api.nvim_set_keymap('t', '<D-v>', '<C-R>+', { noremap = true, silent = true})
18 vim.api.nvim_set_keymap('v', '<D-v>', '<C-R>+', { noremap = true, silent = true})
19 '';
20}
users/natalie/configuration.nix+2-1
...@@ -4,7 +4,8 @@...@@ -4,7 +4,8 @@
4 pkgs,4 pkgs,
5 host,5 host,
6 ...6 ...
7}: {7}:
8{
8 services.tailscale.enable = true;9 services.tailscale.enable = true;
9 fonts.packages = with pkgs; [10 fonts.packages = with pkgs; [
10 nerd-fonts.fira-code11 nerd-fonts.fira-code
users/natalie/desktop/configuration.nix+23-16
...@@ -3,7 +3,8 @@...@@ -3,7 +3,8 @@
3 user,3 user,
4 host,4 host,
5 ...5 ...
6}: {6}:
7{
7 imports = [8 imports = [
8 # Include the results of the hardware scan.9 # Include the results of the hardware scan.
9 ./hardware-configuration.nix10 ./hardware-configuration.nix
...@@ -16,7 +17,7 @@...@@ -16,7 +17,7 @@
16 enable = true;17 enable = true;
17 # Certain features, including CLI integration and system authentication support,18 # Certain features, including CLI integration and system authentication support,
18 # require enabling PolKit integration on some desktop environments (e.g. Plasma).19 # require enabling PolKit integration on some desktop environments (e.g. Plasma).
19 polkitPolicyOwners = [user.username];20 polkitPolicyOwners = [ user.username ];
20 };21 };
2122
22 noisetorch.enable = true;23 noisetorch.enable = true;
...@@ -31,14 +32,9 @@...@@ -31,14 +32,9 @@
31 flake = "/home/nmarks/.dotfiles#nixosConfigurations.nixos";32 flake = "/home/nmarks/.dotfiles#nixosConfigurations.nixos";
32 };33 };
3334
34 neovim = {
35 enable = true;
36 defaultEditor = true;
37 };
38
39 steam = {35 steam = {
40 enable = true;36 enable = true;
41 package = with pkgs; steam.override {extraPkgs = pkgs: [attr];};37 package = with pkgs; steam.override { extraPkgs = pkgs: [ attr ]; };
42 };38 };
4339
44 git = {40 git = {
...@@ -62,7 +58,7 @@...@@ -62,7 +58,7 @@
6258
63 xdg.portal = {59 xdg.portal = {
64 enable = true;60 enable = true;
65 extraPortals = with pkgs; [xdg-desktop-portal-gtk];61 extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
66 };62 };
67 virtualisation = {63 virtualisation = {
68 containers.enable = true;64 containers.enable = true;
...@@ -75,7 +71,10 @@...@@ -75,7 +71,10 @@
75 libvirtd.enable = true;71 libvirtd.enable = true;
76 };72 };
7773
78 nix.settings.trusted-users = ["root" user.username];74 nix.settings.trusted-users = [
75 "root"
76 user.username
77 ];
79 systemd = {78 systemd = {
80 targets = {79 targets = {
81 sleep.enable = false;80 sleep.enable = false;
...@@ -84,16 +83,16 @@...@@ -84,16 +83,16 @@
84 hybrid-sleep.enable = false;83 hybrid-sleep.enable = false;
85 };84 };
8685
87 packages = [pkgs.observatory];86 packages = [ pkgs.observatory ];
8887
89 services.monitord.wantedBy = ["multi-user.target"];88 services.monitord.wantedBy = [ "multi-user.target" ];
90 };89 };
9190
92 i18n = {91 i18n = {
93 # Select internationalisation properties.92 # Select internationalisation properties.
94 defaultLocale = "en_US.UTF-8";93 defaultLocale = "en_US.UTF-8";
9594
96 supportedLocales = ["all"];95 supportedLocales = [ "all" ];
9796
98 extraLocaleSettings = {97 extraLocaleSettings = {
99 LC_ADDRESS = "en_US.UTF-8";98 LC_ADDRESS = "en_US.UTF-8";
...@@ -133,7 +132,11 @@...@@ -133,7 +132,11 @@
133 shell = pkgs.fish;132 shell = pkgs.fish;
134 isNormalUser = true;133 isNormalUser = true;
135 description = user.name;134 description = user.name;
136 extraGroups = ["networkmanager" "wheel" "docker"];135 extraGroups = [
136 "networkmanager"
137 "wheel"
138 "docker"
139 ];
137 # openssh.authorizedKeys.keyFiles = ["~/.ssh/id_ed25519.pub"];140 # openssh.authorizedKeys.keyFiles = ["~/.ssh/id_ed25519.pub"];
138 packages = with pkgs; [141 packages = with pkgs; [
139 firefox142 firefox
...@@ -157,12 +160,16 @@...@@ -157,12 +160,16 @@
157 # wireless.enable = true; # Enables wireless support via wpa_supplicant.160 # wireless.enable = true; # Enables wireless support via wpa_supplicant.
158 networkmanager.enable = true;161 networkmanager.enable = true;
159 firewall = {162 firewall = {
160 allowedTCPPorts = [22 80 443];163 allowedTCPPorts = [
164 22
165 80
166 443
167 ];
161 enable = true;168 enable = true;
162 };169 };
163 interfaces.enp11s0.wakeOnLan = {170 interfaces.enp11s0.wakeOnLan = {
164 enable = true;171 enable = true;
165 policy = ["magic"];172 policy = [ "magic" ];
166 };173 };
167 };174 };
168175
users/natalie/desktop/hardware-configuration.nix+17-7
...@@ -7,15 +7,22 @@...@@ -7,15 +7,22 @@
7 pkgs,7 pkgs,
8 modulesPath,8 modulesPath,
9 ...9 ...
10}: {10}:
11{
11 imports = [12 imports = [
12 (modulesPath + "/installer/scan/not-detected.nix")13 (modulesPath + "/installer/scan/not-detected.nix")
13 ];14 ];
1415
15 boot.initrd.availableKernelModules = ["nvme" "ahci" "xhci_pci" "usbhid" "sd_mod"];16 boot.initrd.availableKernelModules = [
16 boot.initrd.kernelModules = [];17 "nvme"
17 boot.kernelModules = ["kvm-amd"];18 "ahci"
18 boot.extraModulePackages = [];19 "xhci_pci"
20 "usbhid"
21 "sd_mod"
22 ];
23 boot.initrd.kernelModules = [ ];
24 boot.kernelModules = [ "kvm-amd" ];
25 boot.extraModulePackages = [ ];
1926
20 fileSystems."/" = {27 fileSystems."/" = {
21 device = "/dev/disk/by-uuid/5838d50d-e6e8-4ad2-a25e-524f4c46da35";28 device = "/dev/disk/by-uuid/5838d50d-e6e8-4ad2-a25e-524f4c46da35";
...@@ -25,7 +32,10 @@...@@ -25,7 +32,10 @@
25 fileSystems."/boot/efi" = {32 fileSystems."/boot/efi" = {
26 device = "/dev/disk/by-uuid/2319-EE79";33 device = "/dev/disk/by-uuid/2319-EE79";
27 fsType = "vfat";34 fsType = "vfat";
28 options = ["fmask=0022" "dmask=0022"];35 options = [
36 "fmask=0022"
37 "dmask=0022"
38 ];
29 };39 };
3040
31 fileSystems."/home/nmarks/Games/steam" = {41 fileSystems."/home/nmarks/Games/steam" = {
...@@ -34,7 +44,7 @@...@@ -34,7 +44,7 @@
34 };44 };
3545
36 swapDevices = [46 swapDevices = [
37 {device = "/dev/disk/by-uuid/a4128bb9-239c-4aa9-9777-5067feb77b28";}47 { device = "/dev/disk/by-uuid/a4128bb9-239c-4aa9-9777-5067feb77b28"; }
38 ];48 ];
3949
40 # Enables DHCP on each ethernet and wireless interface. In case of scripted networking50 # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
users/natalie/desktop/home.nix+3-7
...@@ -6,12 +6,8 @@...@@ -6,12 +6,8 @@
6 userSettings,6 userSettings,
7 systemSettings,7 systemSettings,
8 ...8 ...
9}: {9}:
10 imports = [10{
11 inputs.nixvim.homeManagerModules.nixvim
12 #set up nixvim
13 # ../../modules/nixvim
14 ];
15 home = {11 home = {
16 stateVersion = "23.05"; # Please read the comment before changing.12 stateVersion = "23.05"; # Please read the comment before changing.
1713
...@@ -32,7 +28,7 @@...@@ -32,7 +28,7 @@
32 path-of-building28 path-of-building
33 wineWowPackages.stable29 wineWowPackages.stable
34 winetricks30 winetricks
35 (prismlauncher.override {gamemodeSupport = true;})31 (prismlauncher.override { gamemodeSupport = true; })
3632
37 #window manager stuff33 #window manager stuff
38 wofi34 wofi
users/natalie/home.nix+2-1
...@@ -2,7 +2,8 @@...@@ -2,7 +2,8 @@
2 pkgs,2 pkgs,
3 lib,3 lib,
4 ...4 ...
5} @ args: {5}@args:
6{
6 programs = {7 programs = {
7 # sort-lines:start8 # sort-lines:start
8 atuin.enable = true;9 atuin.enable = true;
users/natalie/laptop/configuration.nix+3-3
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1{pkgs, ...}: {1{ pkgs, ... }:
2{
2 environment.systemPackages = with pkgs; [3 environment.systemPackages = with pkgs; [
3 neovim
4 pinentry_mac4 pinentry_mac
5 signal-desktop-bin5 signal-desktop-bin
6 ];6 ];
...@@ -8,7 +8,7 @@...@@ -8,7 +8,7 @@
8 # Custom configuration modules in "modules" are shared between users,8 # Custom configuration modules in "modules" are shared between users,
9 # and can be configured in this "shared" namespace9 # and can be configured in this "shared" namespace
10 shared.darwin = {10 shared.darwin = {
11 macAppStoreApps = ["wireguard"];11 macAppStoreApps = [ "wireguard" ];
12 };12 };
1313
14 # Create /etc/zshrc that loads the nix-darwin environment.14 # Create /etc/zshrc that loads the nix-darwin environment.
users/natalie/laptop/home.nix+2-6
...@@ -6,12 +6,8 @@...@@ -6,12 +6,8 @@
6 user,6 user,
7 host,7 host,
8 ...8 ...
9} @ args: {9}@args:
10 imports = [10{
11 inputs.nixvim.homeManagerModules.nixvim
12 #set up nixvim
13 # ../../modules/nixvim
14 ];
15 home = {11 home = {
16 stateVersion = "23.05"; # Please read the comment before changing.12 stateVersion = "23.05"; # Please read the comment before changing.
17 # shell = pkgs.fish;13 # shell = pkgs.fish;
users/natalie/packages.nix+5-3
...@@ -1,6 +1,7 @@...@@ -1,6 +1,7 @@
1# Packages installed with home-manager1# Packages installed with home-manager
2{pkgs, ...}:2{ pkgs, ... }:
3with pkgs; [3with pkgs;
4[
4 #general development5 #general development
5 just6 just
6 pkg-config7 pkg-config
...@@ -35,7 +36,7 @@ with pkgs; [...@@ -35,7 +36,7 @@ with pkgs; [
35 nh36 nh
3637
37 #terminal stuff38 #terminal stuff
38 (btop.override {cudaSupport = true;})39 (btop.override { cudaSupport = true; })
39 tmux40 tmux
40 zellij41 zellij
41 lazygit42 lazygit
...@@ -78,6 +79,7 @@ with pkgs; [...@@ -78,6 +79,7 @@ with pkgs; [
78 statix79 statix
7980
80 #neovim deps81 #neovim deps
82 # TODO: from clo, maybe u can remove all of these? i don't wanna break tho
81 lua51Packages.lua83 lua51Packages.lua
82 lua51Packages.luarocks-nix84 lua51Packages.luarocks-nix
83 codespell85 codespell
users/natalie/user.nix+1-1
...@@ -3,7 +3,7 @@ rec {...@@ -3,7 +3,7 @@ rec {
3 name = "Natalie"; # name/identifier3 name = "Natalie"; # name/identifier
4 email = "nmarks413@gmail.com"; # email (used for certain configurations)4 email = "nmarks413@gmail.com"; # email (used for certain configurations)
5 dotfilesDir = "~/.dotfiles"; # absolute path of the local repo5 dotfilesDir = "~/.dotfiles"; # absolute path of the local repo
6 theme = "catppuccin-mocha"; #name of theme that stylix will use6 theme = "catppuccin-mocha"; # name of theme that stylix will use
7 browser = "firefox"; # Default browser; must select one from ./user/app/browser/7 browser = "firefox"; # Default browser; must select one from ./user/app/browser/
8 term = "ghostty"; # Default terminal command;8 term = "ghostty"; # Default terminal command;
9 font = "iosevka"; # Selected font9 font = "iosevka"; # Selected font
users/natalie/vim.nix created+9
...@@ -0,0 +1,9 @@
1{ ... }:
2{
3 vim = {
4 theme = {
5 name = "catppuccin";
6 style = "mocha";
7 };
8 };
9}