diff options
| author | vin <vin@vineetk.net> | 2025-05-07 17:00:14 -0400 |
|---|---|---|
| committer | vin <vin@vineetk.net> | 2025-05-07 17:44:33 -0400 |
| commit | 1ccc0f2c368f35d3082e4b7cef5789f40a6e1bfe (patch) | |
| tree | 3284daaf6c634b58bf553ed79f0641c4b7158292 /hosts | |
| parent | 208827b8f8a37fc8bc148c7b0e18791a78cd0cc9 (diff) | |
run nixfmt
Diffstat (limited to 'hosts')
| -rw-r--r-- | hosts/demiurge/default.nix | 290 | ||||
| -rw-r--r-- | hosts/demiurge/hardware.nix | 97 | ||||
| -rw-r--r-- | hosts/hastur/default.nix | 99 | ||||
| -rw-r--r-- | hosts/hastur/hardware.nix | 82 | ||||
| -rw-r--r-- | hosts/saklas/default.nix | 158 |
5 files changed, 458 insertions, 268 deletions
diff --git a/hosts/demiurge/default.nix b/hosts/demiurge/default.nix index 32696c3..50839ae 100644 --- a/hosts/demiurge/default.nix +++ b/hosts/demiurge/default.nix | |||
| @@ -1,28 +1,36 @@ | |||
| 1 | { config, home-manager, lib, pkgs, inputs, llama-cpp, ... }: | 1 | { |
| 2 | config, | ||
| 3 | home-manager, | ||
| 4 | lib, | ||
| 5 | pkgs, | ||
| 6 | inputs, | ||
| 7 | llama-cpp, | ||
| 8 | ... | ||
| 9 | }: | ||
| 2 | 10 | ||
| 3 | { | 11 | { |
| 4 | imports = | 12 | imports = [ |
| 5 | [ | 13 | ./hardware.nix |
| 6 | ./hardware.nix | 14 | home-manager.nixosModules.default |
| 7 | home-manager.nixosModules.default | 15 | ]; |
| 8 | ]; | ||
| 9 | 16 | ||
| 10 | # nixpkgs stuff | 17 | # nixpkgs stuff |
| 11 | nixpkgs = { | 18 | nixpkgs = { |
| 12 | config = { | 19 | config = { |
| 13 | # selectively allow unfree packages | 20 | # selectively allow unfree packages |
| 14 | allowUnfreePredicate = pkg: | 21 | allowUnfreePredicate = |
| 22 | pkg: | ||
| 15 | builtins.elem (lib.getName pkg) [ | 23 | builtins.elem (lib.getName pkg) [ |
| 16 | /* | 24 | /* |
| 17 | "cuda_cccl" | 25 | "cuda_cccl" |
| 18 | "cuda_cudart" | 26 | "cuda_cudart" |
| 19 | "cuda_nvcc" | 27 | "cuda_nvcc" |
| 20 | "cudnn" | 28 | "cudnn" |
| 21 | "libcublas" | 29 | "libcublas" |
| 22 | "libcufile" | 30 | "libcufile" |
| 23 | "quartus-prime-lite" | 31 | "quartus-prime-lite" |
| 24 | "quartus-prime-lite-unwrapped" | 32 | "quartus-prime-lite-unwrapped" |
| 25 | */ | 33 | */ |
| 26 | "steam" | 34 | "steam" |
| 27 | "steam-unwrapped" | 35 | "steam-unwrapped" |
| 28 | ]; | 36 | ]; |
| @@ -40,11 +48,13 @@ | |||
| 40 | (self: super: { | 48 | (self: super: { |
| 41 | invidious = super.invidious.overrideAttrs (old: { | 49 | invidious = super.invidious.overrideAttrs (old: { |
| 42 | # try removing shorts by ignoring any videos shorter than 65 seconds | 50 | # try removing shorts by ignoring any videos shorter than 65 seconds |
| 43 | postPatch = old.postPatch + '' | 51 | postPatch = |
| 44 | sed -i '/GROUP BY channel/a\ AND length_seconds > 65' src/invidious/database/channels.cr | 52 | old.postPatch |
| 45 | sed -i 's/\({view_name}\) \(ORDER BY published\)/\1 WHERE length_seconds > 65 \2/' src/invidious/users.cr | 53 | + '' |
| 46 | sed -i 's/\({values})\) \(ORDER BY published\)/\1 AND length_seconds > 65 \2/' src/invidious/users.cr | 54 | sed -i '/GROUP BY channel/a\ AND length_seconds > 65' src/invidious/database/channels.cr |
| 47 | ''; | 55 | sed -i 's/\({view_name}\) \(ORDER BY published\)/\1 WHERE length_seconds > 65 \2/' src/invidious/users.cr |
| 56 | sed -i 's/\({values})\) \(ORDER BY published\)/\1 AND length_seconds > 65 \2/' src/invidious/users.cr | ||
| 57 | ''; | ||
| 48 | }); | 58 | }); |
| 49 | }) | 59 | }) |
| 50 | (self: super: { | 60 | (self: super: { |
| @@ -61,11 +71,21 @@ | |||
| 61 | }) | 71 | }) |
| 62 | (self: super: { | 72 | (self: super: { |
| 63 | alvr = super.alvr.overrideAttrs (old: { | 73 | alvr = super.alvr.overrideAttrs (old: { |
| 64 | buildInputs = old.buildInputs ++ [ super.android-tools super.usbutils ]; | 74 | buildInputs = old.buildInputs ++ [ |
| 75 | super.android-tools | ||
| 76 | super.usbutils | ||
| 77 | ]; | ||
| 65 | nativeBuildInputs = old.nativeBuildInputs ++ [ super.makeWrapper ]; | 78 | nativeBuildInputs = old.nativeBuildInputs ++ [ super.makeWrapper ]; |
| 66 | postInstall = (old.postInstall or "") + '' | 79 | postInstall = |
| 67 | wrapProgram $out/bin/alvr_dashboard --prefix PATH : "${super.lib.makeBinPath [ super.android-tools super.usbutils ]}" | 80 | (old.postInstall or "") |
| 68 | ''; | 81 | + '' |
| 82 | wrapProgram $out/bin/alvr_dashboard --prefix PATH : "${ | ||
| 83 | super.lib.makeBinPath [ | ||
| 84 | super.android-tools | ||
| 85 | super.usbutils | ||
| 86 | ] | ||
| 87 | }" | ||
| 88 | ''; | ||
| 69 | }); | 89 | }); |
| 70 | }) | 90 | }) |
| 71 | ]; | 91 | ]; |
| @@ -94,7 +114,10 @@ | |||
| 94 | efi.canTouchEfiVariables = true; | 114 | efi.canTouchEfiVariables = true; |
| 95 | }; | 115 | }; |
| 96 | 116 | ||
| 97 | zfs.extraPools = [ "data_wd" "nvme_warm" ]; | 117 | zfs.extraPools = [ |
| 118 | "data_wd" | ||
| 119 | "nvme_warm" | ||
| 120 | ]; | ||
| 98 | }; | 121 | }; |
| 99 | 122 | ||
| 100 | # disable wifi and open some ports | 123 | # disable wifi and open some ports |
| @@ -105,7 +128,11 @@ | |||
| 105 | wireless.enable = false; | 128 | wireless.enable = false; |
| 106 | 129 | ||
| 107 | firewall = { | 130 | firewall = { |
| 108 | allowedTCPPorts = [ 22 80 443 ]; | 131 | allowedTCPPorts = [ |
| 132 | 22 | ||
| 133 | 80 | ||
| 134 | 443 | ||
| 135 | ]; | ||
| 109 | allowedUDPPorts = [ 51413 ]; | 136 | allowedUDPPorts = [ 51413 ]; |
| 110 | }; | 137 | }; |
| 111 | 138 | ||
| @@ -127,11 +154,16 @@ | |||
| 127 | ip route del 100.100.100.100/32 dev tailscale0 | 154 | ip route del 100.100.100.100/32 dev tailscale0 |
| 128 | ''; | 155 | ''; |
| 129 | 156 | ||
| 130 | peers = [{ | 157 | peers = [ |
| 131 | allowedIPs = [ "0.0.0.0/0" "::0/0" ]; | 158 | { |
| 132 | endpoint = "45.134.142.206:51820"; | 159 | allowedIPs = [ |
| 133 | publicKey = "H5t7PsMDnUAHrR8D2Jt3Mh6N6w43WmCzrOHShlEU+zw="; | 160 | "0.0.0.0/0" |
| 134 | }]; | 161 | "::0/0" |
| 162 | ]; | ||
| 163 | endpoint = "45.134.142.206:51820"; | ||
| 164 | publicKey = "H5t7PsMDnUAHrR8D2Jt3Mh6N6w43WmCzrOHShlEU+zw="; | ||
| 165 | } | ||
| 166 | ]; | ||
| 135 | }; | 167 | }; |
| 136 | }; | 168 | }; |
| 137 | 169 | ||
| @@ -145,7 +177,10 @@ | |||
| 145 | }; | 177 | }; |
| 146 | 178 | ||
| 147 | # enable flakes and nix cli | 179 | # enable flakes and nix cli |
| 148 | nix.settings.experimental-features = [ "nix-command" "flakes" ]; | 180 | nix.settings.experimental-features = [ |
| 181 | "nix-command" | ||
| 182 | "flakes" | ||
| 183 | ]; | ||
| 149 | 184 | ||
| 150 | # Define a user account. | 185 | # Define a user account. |
| 151 | users.users = { | 186 | users.users = { |
| @@ -229,36 +264,38 @@ | |||
| 229 | # I prefer doas over sudo for simplicity | 264 | # I prefer doas over sudo for simplicity |
| 230 | doas = { | 265 | doas = { |
| 231 | enable = true; | 266 | enable = true; |
| 232 | extraRules = [{ | 267 | extraRules = [ |
| 233 | users = ["vin"]; | 268 | { |
| 234 | keepEnv = true; | 269 | users = [ "vin" ]; |
| 235 | persist = true; | 270 | keepEnv = true; |
| 236 | }]; | 271 | persist = true; |
| 272 | } | ||
| 273 | ]; | ||
| 237 | }; | 274 | }; |
| 238 | 275 | ||
| 239 | pki.certificates = [ | 276 | pki.certificates = [ |
| 240 | '' | 277 | '' |
| 241 | -----BEGIN CERTIFICATE----- | 278 | -----BEGIN CERTIFICATE----- |
| 242 | MIIDMDCCAhigAwIBAgIUcSUafnojcFKod3f436VELfEKoFkwDQYJKoZIhvcNAQEL | 279 | MIIDMDCCAhigAwIBAgIUcSUafnojcFKod3f436VELfEKoFkwDQYJKoZIhvcNAQEL |
| 243 | BQAwHTEbMBkGA1UEAwwSZGVtaXVyZ2UuZXBpc3RlbWlhMB4XDTI1MDMwMzEwMjQw | 280 | BQAwHTEbMBkGA1UEAwwSZGVtaXVyZ2UuZXBpc3RlbWlhMB4XDTI1MDMwMzEwMjQw |
| 244 | OVoXDTI2MDMwMzEwMjQwOVowHTEbMBkGA1UEAwwSZGVtaXVyZ2UuZXBpc3RlbWlh | 281 | OVoXDTI2MDMwMzEwMjQwOVowHTEbMBkGA1UEAwwSZGVtaXVyZ2UuZXBpc3RlbWlh |
| 245 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwiRlreCXc7f+yWclxR2M | 282 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwiRlreCXc7f+yWclxR2M |
| 246 | 639g0+Lr/c9HrX7EM2/olavPAtZgCzqqvJsDmXq4AURlwd82wZUZxXjWFwlRji/+ | 283 | 639g0+Lr/c9HrX7EM2/olavPAtZgCzqqvJsDmXq4AURlwd82wZUZxXjWFwlRji/+ |
| 247 | WViXQBTWwnXVjc9MJlxTq2X2zfU2GIxYsrA1ZQuj0wVHlA+R/66oL0Padc/qQZfv | 284 | WViXQBTWwnXVjc9MJlxTq2X2zfU2GIxYsrA1ZQuj0wVHlA+R/66oL0Padc/qQZfv |
| 248 | sshQnrqnutvGobBWEGJXcCIDiwUGgHlIoelwY9G0GLE/rkVujNjAonyMhVGJHVUv | 285 | sshQnrqnutvGobBWEGJXcCIDiwUGgHlIoelwY9G0GLE/rkVujNjAonyMhVGJHVUv |
| 249 | lXyc3RNslQHymr4Wl6+lL6V6XfuB1taECJYSLXPx66TvJqod2Io+b7T7cWp+9g9U | 286 | lXyc3RNslQHymr4Wl6+lL6V6XfuB1taECJYSLXPx66TvJqod2Io+b7T7cWp+9g9U |
| 250 | B2jQu1YnPRpwjdPvbOCPjPbOP6UcbyHdbHAidSM0FSL5riVUmugwDwbQKXFFX2gH | 287 | B2jQu1YnPRpwjdPvbOCPjPbOP6UcbyHdbHAidSM0FSL5riVUmugwDwbQKXFFX2gH |
| 251 | hwIDAQABo2gwZjAfBgNVHREEGDAWghQqLmRlbWl1cmdlLmVwaXN0ZW1pYTATBgNV | 288 | hwIDAQABo2gwZjAfBgNVHREEGDAWghQqLmRlbWl1cmdlLmVwaXN0ZW1pYTATBgNV |
| 252 | HSUEDDAKBggrBgEFBQcDATAPBgNVHRMECDAGAQH/AgEAMB0GA1UdDgQWBBTjMVhw | 289 | HSUEDDAKBggrBgEFBQcDATAPBgNVHRMECDAGAQH/AgEAMB0GA1UdDgQWBBTjMVhw |
| 253 | zmkE6P5jFHkLVQE2gNB2ejANBgkqhkiG9w0BAQsFAAOCAQEAWvnwB83vXzQFpObF | 290 | zmkE6P5jFHkLVQE2gNB2ejANBgkqhkiG9w0BAQsFAAOCAQEAWvnwB83vXzQFpObF |
| 254 | vn/nfZ9wYpNaBsE15ab3Fwd2nDc55KDkDWgBi5Xl8fwN3OhFOU2XXBCYqbCU6asx | 291 | vn/nfZ9wYpNaBsE15ab3Fwd2nDc55KDkDWgBi5Xl8fwN3OhFOU2XXBCYqbCU6asx |
| 255 | OnSx9glbhJioORO7B5ENbEYrpB97SaWASNXrBQ2KiQT5aC+9xb52K53kkk0tTn2l | 292 | OnSx9glbhJioORO7B5ENbEYrpB97SaWASNXrBQ2KiQT5aC+9xb52K53kkk0tTn2l |
| 256 | nBb+jyLItzWX99H6EavOq69a4T2BObZaSPQAfpM8FIrKl+UZC3152+bi8wKfG4K4 | 293 | nBb+jyLItzWX99H6EavOq69a4T2BObZaSPQAfpM8FIrKl+UZC3152+bi8wKfG4K4 |
| 257 | FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | 294 | FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM |
| 258 | /ek8Rmf6DTLaFBx+raWyDTgMY23lvWTKDTT1+dZnRNcg72bFpIdqHsDrIg/IBjZ0 | 295 | /ek8Rmf6DTLaFBx+raWyDTgMY23lvWTKDTT1+dZnRNcg72bFpIdqHsDrIg/IBjZ0 |
| 259 | 3eGfkQ== | 296 | 3eGfkQ== |
| 260 | -----END CERTIFICATE----- | 297 | -----END CERTIFICATE----- |
| 261 | '' | 298 | '' |
| 262 | ]; | 299 | ]; |
| 263 | 300 | ||
| 264 | sudo.enable = false; | 301 | sudo.enable = false; |
| @@ -343,7 +380,11 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 343 | default_user_preferences = { | 380 | default_user_preferences = { |
| 344 | captions = [ "English" ]; | 381 | captions = [ "English" ]; |
| 345 | dark_mode = "dark"; | 382 | dark_mode = "dark"; |
| 346 | feed_menu = [ "Popular" "Subscriptions" "Playlists" ]; | 383 | feed_menu = [ |
| 384 | "Popular" | ||
| 385 | "Subscriptions" | ||
| 386 | "Playlists" | ||
| 387 | ]; | ||
| 347 | max_results = 100; | 388 | max_results = 100; |
| 348 | quality = "dash"; | 389 | quality = "dash"; |
| 349 | save_player_pos = true; | 390 | save_player_pos = true; |
| @@ -420,9 +461,9 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 420 | }; | 461 | }; |
| 421 | 462 | ||
| 422 | "sdui.demiurge.epistemia" = { | 463 | "sdui.demiurge.epistemia" = { |
| 423 | # addSSL = true; | 464 | # addSSL = true; |
| 424 | # sslCertificate = "/var/demiurge.epistemia.crt"; | 465 | # sslCertificate = "/var/demiurge.epistemia.crt"; |
| 425 | # sslCertificateKey = "/var/demiurge.epistemia.key"; | 466 | # sslCertificateKey = "/var/demiurge.epistemia.key"; |
| 426 | locations."/" = { | 467 | locations."/" = { |
| 427 | proxyPass = "http://127.0.0.1:7860"; | 468 | proxyPass = "http://127.0.0.1:7860"; |
| 428 | proxyWebsockets = true; | 469 | proxyWebsockets = true; |
| @@ -623,7 +664,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 623 | name = "free software directory"; | 664 | name = "free software directory"; |
| 624 | engine = "mediawiki"; | 665 | engine = "mediawiki"; |
| 625 | shortcut = "fsd"; | 666 | shortcut = "fsd"; |
| 626 | categories = ["it" "software wikis"]; | 667 | categories = [ |
| 668 | "it" | ||
| 669 | "software wikis" | ||
| 670 | ]; | ||
| 627 | base_url = "https://directory.fsf.org/"; | 671 | base_url = "https://directory.fsf.org/"; |
| 628 | search_type = "title"; | 672 | search_type = "title"; |
| 629 | timeout = 5.0; | 673 | timeout = 5.0; |
| @@ -637,7 +681,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 637 | name = "gentoo"; | 681 | name = "gentoo"; |
| 638 | engine = "mediawiki"; | 682 | engine = "mediawiki"; |
| 639 | shortcut = "ge"; | 683 | shortcut = "ge"; |
| 640 | categories = ["it" "software wikis"]; | 684 | categories = [ |
| 685 | "it" | ||
| 686 | "software wikis" | ||
| 687 | ]; | ||
| 641 | base_url = "https://wiki.gentoo.org/"; | 688 | base_url = "https://wiki.gentoo.org/"; |
| 642 | api_path = "api.php"; | 689 | api_path = "api.php"; |
| 643 | search_type = "text"; | 690 | search_type = "text"; |
| @@ -744,7 +791,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 744 | engine = "stackexchange"; | 791 | engine = "stackexchange"; |
| 745 | shortcut = "st"; | 792 | shortcut = "st"; |
| 746 | api_site = "stackoverflow"; | 793 | api_site = "stackoverflow"; |
| 747 | categories = ["it" "q&a"]; | 794 | categories = [ |
| 795 | "it" | ||
| 796 | "q&a" | ||
| 797 | ]; | ||
| 748 | } | 798 | } |
| 749 | 799 | ||
| 750 | { | 800 | { |
| @@ -752,7 +802,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 752 | engine = "stackexchange"; | 802 | engine = "stackexchange"; |
| 753 | shortcut = "ubuntu"; | 803 | shortcut = "ubuntu"; |
| 754 | api_site = "askubuntu"; | 804 | api_site = "askubuntu"; |
| 755 | categories = ["it" "q&a"]; | 805 | categories = [ |
| 806 | "it" | ||
| 807 | "q&a" | ||
| 808 | ]; | ||
| 756 | } | 809 | } |
| 757 | 810 | ||
| 758 | { | 811 | { |
| @@ -760,15 +813,21 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 760 | engine = "stackexchange"; | 813 | engine = "stackexchange"; |
| 761 | shortcut = "su"; | 814 | shortcut = "su"; |
| 762 | api_site = "superuser"; | 815 | api_site = "superuser"; |
| 763 | categories = ["it" "q&a"]; | 816 | categories = [ |
| 817 | "it" | ||
| 818 | "q&a" | ||
| 819 | ]; | ||
| 764 | } | 820 | } |
| 765 | 821 | ||
| 766 | { | 822 | { |
| 767 | name = "nixos.discourse"; | 823 | name = "nixos.discourse"; |
| 768 | engine = "discourse"; | 824 | engine = "discourse"; |
| 769 | shortcut = "dnos"; | 825 | shortcut = "dnos"; |
| 770 | base_url = "https://discourse.nixos.org"; | 826 | base_url = "https://discourse.nixos.org"; |
| 771 | categories = ["it" "q&a"]; | 827 | categories = [ |
| 828 | "it" | ||
| 829 | "q&a" | ||
| 830 | ]; | ||
| 772 | } | 831 | } |
| 773 | 832 | ||
| 774 | { | 833 | { |
| @@ -786,7 +845,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 786 | url_query = "URL"; | 845 | url_query = "URL"; |
| 787 | title_query = "Title"; | 846 | title_query = "Title"; |
| 788 | content_query = "Snippet"; | 847 | content_query = "Snippet"; |
| 789 | categories = ["general" "web"]; | 848 | categories = [ |
| 849 | "general" | ||
| 850 | "web" | ||
| 851 | ]; | ||
| 790 | shortcut = "wib"; | 852 | shortcut = "wib"; |
| 791 | about.website = "https://wiby.me/"; | 853 | about.website = "https://wiby.me/"; |
| 792 | } | 854 | } |
| @@ -796,7 +858,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 796 | engine = "mediawiki"; | 858 | engine = "mediawiki"; |
| 797 | weight = 0.5; | 859 | weight = 0.5; |
| 798 | shortcut = "wb"; | 860 | shortcut = "wb"; |
| 799 | categories = ["general" "wikimedia"]; | 861 | categories = [ |
| 862 | "general" | ||
| 863 | "wikimedia" | ||
| 864 | ]; | ||
| 800 | base_url = "https://{language}.wikibooks.org/"; | 865 | base_url = "https://{language}.wikibooks.org/"; |
| 801 | search_type = "text"; | 866 | search_type = "text"; |
| 802 | about = { | 867 | about = { |
| @@ -809,7 +874,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 809 | name = "wiktionary"; | 874 | name = "wiktionary"; |
| 810 | engine = "mediawiki"; | 875 | engine = "mediawiki"; |
| 811 | shortcut = "wt"; | 876 | shortcut = "wt"; |
| 812 | categories = ["dictionaries" "wikimedia"]; | 877 | categories = [ |
| 878 | "dictionaries" | ||
| 879 | "wikimedia" | ||
| 880 | ]; | ||
| 813 | base_url = "https://{language}.wiktionary.org/"; | 881 | base_url = "https://{language}.wiktionary.org/"; |
| 814 | search_type = "text"; | 882 | search_type = "text"; |
| 815 | about = { | 883 | about = { |
| @@ -823,7 +891,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 823 | engine = "mediawiki"; | 891 | engine = "mediawiki"; |
| 824 | weight = 0.5; | 892 | weight = 0.5; |
| 825 | shortcut = "wv"; | 893 | shortcut = "wv"; |
| 826 | categories = ["general" "wikimedia"]; | 894 | categories = [ |
| 895 | "general" | ||
| 896 | "wikimedia" | ||
| 897 | ]; | ||
| 827 | base_url = "https://{language}.wikiversity.org/"; | 898 | base_url = "https://{language}.wikiversity.org/"; |
| 828 | search_type = "text"; | 899 | search_type = "text"; |
| 829 | about = { | 900 | about = { |
| @@ -849,7 +920,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 849 | shortcut = "br"; | 920 | shortcut = "br"; |
| 850 | time_range_support = true; | 921 | time_range_support = true; |
| 851 | paging = true; | 922 | paging = true; |
| 852 | categories = ["general" "web"]; | 923 | categories = [ |
| 924 | "general" | ||
| 925 | "web" | ||
| 926 | ]; | ||
| 853 | brave_category = "search"; | 927 | brave_category = "search"; |
| 854 | } | 928 | } |
| 855 | 929 | ||
| @@ -858,7 +932,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 858 | engine = "brave"; | 932 | engine = "brave"; |
| 859 | network = "brave"; | 933 | network = "brave"; |
| 860 | shortcut = "brimg"; | 934 | shortcut = "brimg"; |
| 861 | categories = ["images" "web"]; | 935 | categories = [ |
| 936 | "images" | ||
| 937 | "web" | ||
| 938 | ]; | ||
| 862 | brave_category = "images"; | 939 | brave_category = "images"; |
| 863 | } | 940 | } |
| 864 | 941 | ||
| @@ -873,7 +950,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 873 | title_xpath = "./h4/a[2]"; | 950 | title_xpath = "./h4/a[2]"; |
| 874 | content_xpath = "./p"; | 951 | content_xpath = "./p"; |
| 875 | first_page_num = 1; | 952 | first_page_num = 1; |
| 876 | categories = ["it" "repos"]; | 953 | categories = [ |
| 954 | "it" | ||
| 955 | "repos" | ||
| 956 | ]; | ||
| 877 | about = { | 957 | about = { |
| 878 | website = "https://sr.ht"; | 958 | website = "https://sr.ht"; |
| 879 | wikidata_id = "Q78514485"; | 959 | wikidata_id = "Q78514485"; |
| @@ -914,12 +994,12 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 914 | udev = { | 994 | udev = { |
| 915 | enable = true; | 995 | enable = true; |
| 916 | extraRules = '' | 996 | extraRules = '' |
| 917 | # ST-Link v2.1 | 997 | # ST-Link v2.1 |
| 918 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", MODE:="0666" | 998 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", MODE:="0666" |
| 919 | 999 | ||
| 920 | # Oculus Quest 2 | 1000 | # Oculus Quest 2 |
| 921 | SUBSYSTEM=="usb", ATTR{idVendor}=="2833", ATTR{idProduct}=="0186", MODE="0660", | 1001 | SUBSYSTEM=="usb", ATTR{idVendor}=="2833", ATTR{idProduct}=="0186", MODE="0660", |
| 922 | GROUP="input", SYMLINK+="ocuquest%n" | 1002 | GROUP="input", SYMLINK+="ocuquest%n" |
| 923 | ''; | 1003 | ''; |
| 924 | }; | 1004 | }; |
| 925 | 1005 | ||
| @@ -928,9 +1008,9 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 928 | xserver = { | 1008 | xserver = { |
| 929 | enable = true; | 1009 | enable = true; |
| 930 | autorun = false; | 1010 | autorun = false; |
| 931 | displayManager.startx.enable = true; | 1011 | displayManager.startx.enable = true; |
| 932 | modules = [ pkgs.xf86_input_wacom ]; | 1012 | modules = [ pkgs.xf86_input_wacom ]; |
| 933 | videoDrivers = [ "amdgpu" ]; | 1013 | videoDrivers = [ "amdgpu" ]; |
| 934 | wacom.enable = true; | 1014 | wacom.enable = true; |
| 935 | }; | 1015 | }; |
| 936 | }; | 1016 | }; |
| @@ -940,26 +1020,26 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 940 | services = { | 1020 | services = { |
| 941 | invidious_token = { | 1021 | invidious_token = { |
| 942 | script = '' | 1022 | script = '' |
| 943 | set -euo pipefail | 1023 | set -euo pipefail |
| 944 | 1024 | ||
| 945 | a="$(${pkgs.podman}/bin/podman run quay.io/invidious/youtube-trusted-session-generator | sed -n 4,5p)" | 1025 | a="$(${pkgs.podman}/bin/podman run quay.io/invidious/youtube-trusted-session-generator | sed -n 4,5p)" |
| 946 | visitor_data=$(echo "$a" | sed -n 1p | cut -d' ' -f2) | 1026 | visitor_data=$(echo "$a" | sed -n 1p | cut -d' ' -f2) |
| 947 | po_token=$(echo "$a" | sed -n 2p | cut -d' ' -f2) | 1027 | po_token=$(echo "$a" | sed -n 2p | cut -d' ' -f2) |
| 948 | day=$(date +%e | tr -d ' ') | 1028 | day=$(date +%e | tr -d ' ') |
| 949 | 1029 | ||
| 950 | printf '{"visitor_data": "%s",\n"po_token": "%s",\n' \ | 1030 | printf '{"visitor_data": "%s",\n"po_token": "%s",\n' \ |
| 951 | "$visitor_data" "$po_token" \ | 1031 | "$visitor_data" "$po_token" \ |
| 952 | >/run/invidious_settings | 1032 | >/run/invidious_settings |
| 953 | 1033 | ||
| 954 | if [ $((day % 2)) -eq 0 ]; then | 1034 | if [ $((day % 2)) -eq 0 ]; then |
| 955 | printf '"force_resolve": "ipv6"}\n' >>/run/invidious_settings | 1035 | printf '"force_resolve": "ipv6"}\n' >>/run/invidious_settings |
| 956 | else | 1036 | else |
| 957 | printf '"force_resolve": "ipv4"}\n' >>/run/invidious_settings | 1037 | printf '"force_resolve": "ipv4"}\n' >>/run/invidious_settings |
| 958 | fi | 1038 | fi |
| 959 | 1039 | ||
| 960 | ${pkgs.systemd}/bin/systemctl restart invidious-sig-helper | 1040 | ${pkgs.systemd}/bin/systemctl restart invidious-sig-helper |
| 961 | ${pkgs.systemd}/bin/systemctl restart invidious | 1041 | ${pkgs.systemd}/bin/systemctl restart invidious |
| 962 | ''; | 1042 | ''; |
| 963 | serviceConfig = { | 1043 | serviceConfig = { |
| 964 | Type = "oneshot"; | 1044 | Type = "oneshot"; |
| 965 | User = "root"; | 1045 | User = "root"; |
diff --git a/hosts/demiurge/hardware.nix b/hosts/demiurge/hardware.nix index b075bb4..21d7ab3 100644 --- a/hosts/demiurge/hardware.nix +++ b/hosts/demiurge/hardware.nix | |||
| @@ -1,53 +1,70 @@ | |||
| 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ | 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ |
| 2 | # and may be overwritten by future invocations. Please make changes | 2 | # and may be overwritten by future invocations. Please make changes |
| 3 | # to /etc/nixos/configuration.nix instead. | 3 | # to /etc/nixos/configuration.nix instead. |
| 4 | { config, lib, pkgs, modulesPath, ... }: | 4 | { |
| 5 | config, | ||
| 6 | lib, | ||
| 7 | pkgs, | ||
| 8 | modulesPath, | ||
| 9 | ... | ||
| 10 | }: | ||
| 5 | 11 | ||
| 6 | { | 12 | { |
| 7 | imports = | 13 | imports = [ |
| 8 | [ (modulesPath + "/installer/scan/not-detected.nix") | 14 | (modulesPath + "/installer/scan/not-detected.nix") |
| 9 | ]; | 15 | ]; |
| 10 | 16 | ||
| 11 | boot.initrd.availableKernelModules = [ "mpt3sas" "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; | 17 | boot.initrd.availableKernelModules = [ |
| 18 | "mpt3sas" | ||
| 19 | "nvme" | ||
| 20 | "xhci_pci" | ||
| 21 | "ahci" | ||
| 22 | "usbhid" | ||
| 23 | "usb_storage" | ||
| 24 | "sd_mod" | ||
| 25 | ]; | ||
| 12 | boot.initrd.kernelModules = [ "amdgpu" ]; | 26 | boot.initrd.kernelModules = [ "amdgpu" ]; |
| 13 | boot.kernelModules = [ "kvm-amd" ]; | 27 | boot.kernelModules = [ "kvm-amd" ]; |
| 14 | boot.extraModulePackages = [ ]; | 28 | boot.extraModulePackages = [ ]; |
| 15 | 29 | ||
| 16 | fileSystems."/" = | 30 | fileSystems."/" = { |
| 17 | { device = "zroot/root"; | 31 | device = "zroot/root"; |
| 18 | fsType = "zfs"; | 32 | fsType = "zfs"; |
| 19 | options = [ "zfsutil" ]; | 33 | options = [ "zfsutil" ]; |
| 20 | }; | 34 | }; |
| 21 | 35 | ||
| 22 | fileSystems."/nix" = | 36 | fileSystems."/nix" = { |
| 23 | { device = "zroot/nix"; | 37 | device = "zroot/nix"; |
| 24 | fsType = "zfs"; | 38 | fsType = "zfs"; |
| 25 | options = [ "zfsutil" ]; | 39 | options = [ "zfsutil" ]; |
| 26 | }; | 40 | }; |
| 27 | 41 | ||
| 28 | fileSystems."/var" = | 42 | fileSystems."/var" = { |
| 29 | { device = "zroot/var"; | 43 | device = "zroot/var"; |
| 30 | fsType = "zfs"; | 44 | fsType = "zfs"; |
| 31 | options = [ "zfsutil" ]; | 45 | options = [ "zfsutil" ]; |
| 32 | }; | 46 | }; |
| 33 | 47 | ||
| 34 | fileSystems."/home" = | 48 | fileSystems."/home" = { |
| 35 | { device = "zroot/home"; | 49 | device = "zroot/home"; |
| 36 | fsType = "zfs"; | 50 | fsType = "zfs"; |
| 37 | options = [ "zfsutil" ]; | 51 | options = [ "zfsutil" ]; |
| 38 | }; | 52 | }; |
| 39 | 53 | ||
| 40 | fileSystems."/data" = | 54 | fileSystems."/data" = { |
| 41 | { device = "nvme_warm"; | 55 | device = "nvme_warm"; |
| 42 | fsType = "zfs"; | 56 | fsType = "zfs"; |
| 43 | options = [ "zfsutil" ]; | 57 | options = [ "zfsutil" ]; |
| 44 | }; | 58 | }; |
| 45 | 59 | ||
| 46 | fileSystems."/boot" = | 60 | fileSystems."/boot" = { |
| 47 | { device = "/dev/disk/by-uuid/1C01-EE5C"; | 61 | device = "/dev/disk/by-uuid/1C01-EE5C"; |
| 48 | fsType = "vfat"; | 62 | fsType = "vfat"; |
| 49 | options = [ "fmask=0022" "dmask=0022" ]; | 63 | options = [ |
| 50 | }; | 64 | "fmask=0022" |
| 65 | "dmask=0022" | ||
| 66 | ]; | ||
| 67 | }; | ||
| 51 | 68 | ||
| 52 | swapDevices = [ ]; | 69 | swapDevices = [ ]; |
| 53 | 70 | ||
diff --git a/hosts/hastur/default.nix b/hosts/hastur/default.nix index 54e1a06..29260c3 100644 --- a/hosts/hastur/default.nix +++ b/hosts/hastur/default.nix | |||
| @@ -2,14 +2,20 @@ | |||
| 2 | # your system. Help is available in the configuration.nix(5) man page, on | 2 | # your system. Help is available in the configuration.nix(5) man page, on |
| 3 | # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). | 3 | # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). |
| 4 | 4 | ||
| 5 | { config, home-manager, lib, pkgs, inputs, ... }: | 5 | { |
| 6 | config, | ||
| 7 | home-manager, | ||
| 8 | lib, | ||
| 9 | pkgs, | ||
| 10 | inputs, | ||
| 11 | ... | ||
| 12 | }: | ||
| 6 | 13 | ||
| 7 | { | 14 | { |
| 8 | imports = | 15 | imports = [ |
| 9 | [ | 16 | ./hardware.nix |
| 10 | ./hardware.nix | 17 | home-manager.nixosModules.default |
| 11 | home-manager.nixosModules.default | 18 | ]; |
| 12 | ]; | ||
| 13 | 19 | ||
| 14 | # decrypt agenix secrets | 20 | # decrypt agenix secrets |
| 15 | age.secrets = { | 21 | age.secrets = { |
| @@ -26,10 +32,12 @@ | |||
| 26 | zfsSupport = true; | 32 | zfsSupport = true; |
| 27 | efiSupport = true; | 33 | efiSupport = true; |
| 28 | efiInstallAsRemovable = true; | 34 | efiInstallAsRemovable = true; |
| 29 | mirroredBoots = [{ | 35 | mirroredBoots = [ |
| 30 | devices = [ "nodev" ]; | 36 | { |
| 31 | path = "/boot"; | 37 | devices = [ "nodev" ]; |
| 32 | }]; | 38 | path = "/boot"; |
| 39 | } | ||
| 40 | ]; | ||
| 33 | }; | 41 | }; |
| 34 | 42 | ||
| 35 | # disable wifi and open some ports | 43 | # disable wifi and open some ports |
| @@ -50,10 +58,10 @@ | |||
| 50 | phase2="auth=MSCHAPv2" | 58 | phase2="auth=MSCHAPv2" |
| 51 | identity="***REDACTED_EMAIL***" | 59 | identity="***REDACTED_EMAIL***" |
| 52 | password="***REDACTED_PASSWORD***" | 60 | password="***REDACTED_PASSWORD***" |
| 53 | ''; | 61 | ''; |
| 54 | }; | 62 | }; |
| 55 | 63 | ||
| 56 | FloridaPoly_BYOD = {}; | 64 | FloridaPoly_BYOD = { }; |
| 57 | 65 | ||
| 58 | iphonebob.pskRaw = "***REDACTED_PSK***"; | 66 | iphonebob.pskRaw = "***REDACTED_PSK***"; |
| 59 | Retreat_86WiFi.pskRaw = "***REDACTED_PSK***"; | 67 | Retreat_86WiFi.pskRaw = "***REDACTED_PSK***"; |
| @@ -85,11 +93,16 @@ | |||
| 85 | ip route del 100.100.100.100/32 dev tailscale0 | 93 | ip route del 100.100.100.100/32 dev tailscale0 |
| 86 | ''; | 94 | ''; |
| 87 | 95 | ||
| 88 | peers = [{ | 96 | peers = [ |
| 89 | allowedIPs = [ "0.0.0.0/0" "::0/0" ]; | 97 | { |
| 90 | endpoint = "45.134.142.219:51820"; | 98 | allowedIPs = [ |
| 91 | publicKey = "FVEKAMJqaJU2AwWn5Mg9TK9IAfJc4XDUmSzEeC/VXGs="; | 99 | "0.0.0.0/0" |
| 92 | }]; | 100 | "::0/0" |
| 101 | ]; | ||
| 102 | endpoint = "45.134.142.219:51820"; | ||
| 103 | publicKey = "FVEKAMJqaJU2AwWn5Mg9TK9IAfJc4XDUmSzEeC/VXGs="; | ||
| 104 | } | ||
| 105 | ]; | ||
| 93 | }; | 106 | }; |
| 94 | }; | 107 | }; |
| 95 | 108 | ||
| @@ -103,7 +116,10 @@ | |||
| 103 | }; | 116 | }; |
| 104 | 117 | ||
| 105 | # enable flakes and nix cli | 118 | # enable flakes and nix cli |
| 106 | nix.settings.experimental-features = [ "nix-command" "flakes" ]; | 119 | nix.settings.experimental-features = [ |
| 120 | "nix-command" | ||
| 121 | "flakes" | ||
| 122 | ]; | ||
| 107 | 123 | ||
| 108 | # Define a user account. | 124 | # Define a user account. |
| 109 | users.users.vin = { | 125 | users.users.vin = { |
| @@ -128,7 +144,8 @@ | |||
| 128 | }; | 144 | }; |
| 129 | 145 | ||
| 130 | # selectively allow unfree packages | 146 | # selectively allow unfree packages |
| 131 | nixpkgs.config.allowUnfreePredicate = pkg: | 147 | nixpkgs.config.allowUnfreePredicate = |
| 148 | pkg: | ||
| 132 | builtins.elem (lib.getName pkg) [ | 149 | builtins.elem (lib.getName pkg) [ |
| 133 | "quartus-prime-lite" | 150 | "quartus-prime-lite" |
| 134 | "quartus-prime-lite-unwrapped" | 151 | "quartus-prime-lite-unwrapped" |
| @@ -176,27 +193,29 @@ | |||
| 176 | # I prefer doas over sudo for simplicity | 193 | # I prefer doas over sudo for simplicity |
| 177 | doas = { | 194 | doas = { |
| 178 | enable = true; | 195 | enable = true; |
| 179 | extraRules = [{ | 196 | extraRules = [ |
| 180 | users = ["vin"]; | 197 | { |
| 181 | keepEnv = true; | 198 | users = [ "vin" ]; |
| 182 | persist = true; | 199 | keepEnv = true; |
| 183 | }]; | 200 | persist = true; |
| 201 | } | ||
| 202 | ]; | ||
| 184 | }; | 203 | }; |
| 185 | 204 | ||
| 186 | pki.certificates = [ | 205 | pki.certificates = [ |
| 187 | '' | 206 | '' |
| 188 | -----BEGIN CERTIFICATE----- | 207 | -----BEGIN CERTIFICATE----- |
| 189 | MIIBoDCCAUagAwIBAgIRANI8aOT3LE+pzmsQWjcDOIgwCgYIKoZIzj0EAwIwLjER | 208 | MIIBoDCCAUagAwIBAgIRANI8aOT3LE+pzmsQWjcDOIgwCgYIKoZIzj0EAwIwLjER |
| 190 | MA8GA1UEChMIZGVtaXVyZ2UxGTAXBgNVBAMTEGRlbWl1cmdlIFJvb3QgQ0EwHhcN | 209 | MA8GA1UEChMIZGVtaXVyZ2UxGTAXBgNVBAMTEGRlbWl1cmdlIFJvb3QgQ0EwHhcN |
| 191 | MjUwMjE4MDUzNTA5WhcNMzUwMjE2MDUzNTA5WjAuMREwDwYDVQQKEwhkZW1pdXJn | 210 | MjUwMjE4MDUzNTA5WhcNMzUwMjE2MDUzNTA5WjAuMREwDwYDVQQKEwhkZW1pdXJn |
| 192 | ZTEZMBcGA1UEAxMQZGVtaXVyZ2UgUm9vdCBDQTBZMBMGByqGSM49AgEGCCqGSM49 | 211 | ZTEZMBcGA1UEAxMQZGVtaXVyZ2UgUm9vdCBDQTBZMBMGByqGSM49AgEGCCqGSM49 |
| 193 | AwEHA0IABMv8weeXJSDLygVlBxxAHLCvQCdf2COCk0QffNeDaVlIU/NFo3IyPSqG | 212 | AwEHA0IABMv8weeXJSDLygVlBxxAHLCvQCdf2COCk0QffNeDaVlIU/NFo3IyPSqG |
| 194 | E3YtWEWamU/icgsJS999z3BZ5O+cTP6jRTBDMA4GA1UdDwEB/wQEAwIBBjASBgNV | 213 | E3YtWEWamU/icgsJS999z3BZ5O+cTP6jRTBDMA4GA1UdDwEB/wQEAwIBBjASBgNV |
| 195 | HRMBAf8ECDAGAQH/AgEBMB0GA1UdDgQWBBRM51S3OgTxXwNhdSSHw6llz0APFzAK | 214 | HRMBAf8ECDAGAQH/AgEBMB0GA1UdDgQWBBRM51S3OgTxXwNhdSSHw6llz0APFzAK |
| 196 | BggqhkjOPQQDAgNIADBFAiA9alHJ1XHLlKNRUGRL4tdFC3RZYHtoN8BmBHEfDa1S | 215 | BggqhkjOPQQDAgNIADBFAiA9alHJ1XHLlKNRUGRL4tdFC3RZYHtoN8BmBHEfDa1S |
| 197 | LQIhANgsvYmyCp/Nur2RKaV25CDg3kMYVBXED2HVDy8qa+3i | 216 | LQIhANgsvYmyCp/Nur2RKaV25CDg3kMYVBXED2HVDy8qa+3i |
| 198 | -----END CERTIFICATE----- | 217 | -----END CERTIFICATE----- |
| 199 | '' | 218 | '' |
| 200 | ]; | 219 | ]; |
| 201 | 220 | ||
| 202 | sudo.enable = false; | 221 | sudo.enable = false; |
| @@ -273,8 +292,8 @@ LQIhANgsvYmyCp/Nur2RKaV25CDg3kMYVBXED2HVDy8qa+3i | |||
| 273 | udev = { | 292 | udev = { |
| 274 | enable = true; | 293 | enable = true; |
| 275 | extraRules = '' | 294 | extraRules = '' |
| 276 | # ST-Link v2.1 | 295 | # ST-Link v2.1 |
| 277 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", MODE:="0666" | 296 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", MODE:="0666" |
| 278 | ''; | 297 | ''; |
| 279 | }; | 298 | }; |
| 280 | 299 | ||
| @@ -283,8 +302,8 @@ LQIhANgsvYmyCp/Nur2RKaV25CDg3kMYVBXED2HVDy8qa+3i | |||
| 283 | xserver = { | 302 | xserver = { |
| 284 | enable = true; | 303 | enable = true; |
| 285 | autorun = false; | 304 | autorun = false; |
| 286 | displayManager.startx.enable = true; | 305 | displayManager.startx.enable = true; |
| 287 | videoDrivers = [ "modesetting" ]; | 306 | videoDrivers = [ "modesetting" ]; |
| 288 | }; | 307 | }; |
| 289 | }; | 308 | }; |
| 290 | 309 | ||
diff --git a/hosts/hastur/hardware.nix b/hosts/hastur/hardware.nix index 6a73716..91691b4 100644 --- a/hosts/hastur/hardware.nix +++ b/hosts/hastur/hardware.nix | |||
| @@ -1,47 +1,63 @@ | |||
| 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ | 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ |
| 2 | # and may be overwritten by future invocations. Please make changes | 2 | # and may be overwritten by future invocations. Please make changes |
| 3 | # to /etc/nixos/configuration.nix instead. | 3 | # to /etc/nixos/configuration.nix instead. |
| 4 | { config, lib, pkgs, modulesPath, ... }: | 4 | { |
| 5 | config, | ||
| 6 | lib, | ||
| 7 | pkgs, | ||
| 8 | modulesPath, | ||
| 9 | ... | ||
| 10 | }: | ||
| 5 | 11 | ||
| 6 | { | 12 | { |
| 7 | imports = | 13 | imports = [ |
| 8 | [ (modulesPath + "/installer/scan/not-detected.nix") | 14 | (modulesPath + "/installer/scan/not-detected.nix") |
| 9 | ]; | 15 | ]; |
| 10 | 16 | ||
| 11 | boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; | 17 | boot.initrd.availableKernelModules = [ |
| 18 | "xhci_pci" | ||
| 19 | "thunderbolt" | ||
| 20 | "nvme" | ||
| 21 | "usb_storage" | ||
| 22 | "sd_mod" | ||
| 23 | "rtsx_pci_sdmmc" | ||
| 24 | ]; | ||
| 12 | boot.initrd.kernelModules = [ ]; | 25 | boot.initrd.kernelModules = [ ]; |
| 13 | boot.kernelModules = [ "kvm-intel" ]; | 26 | boot.kernelModules = [ "kvm-intel" ]; |
| 14 | boot.extraModulePackages = [ ]; | 27 | boot.extraModulePackages = [ ]; |
| 15 | 28 | ||
| 16 | fileSystems."/" = | 29 | fileSystems."/" = { |
| 17 | { device = "zroot/root"; | 30 | device = "zroot/root"; |
| 18 | fsType = "zfs"; | 31 | fsType = "zfs"; |
| 19 | }; | 32 | }; |
| 20 | 33 | ||
| 21 | fileSystems."/nix" = | 34 | fileSystems."/nix" = { |
| 22 | { device = "zroot/nix"; | 35 | device = "zroot/nix"; |
| 23 | fsType = "zfs"; | 36 | fsType = "zfs"; |
| 24 | }; | 37 | }; |
| 25 | 38 | ||
| 26 | fileSystems."/var" = | 39 | fileSystems."/var" = { |
| 27 | { device = "zroot/var"; | 40 | device = "zroot/var"; |
| 28 | fsType = "zfs"; | 41 | fsType = "zfs"; |
| 29 | }; | 42 | }; |
| 30 | 43 | ||
| 31 | fileSystems."/home" = | 44 | fileSystems."/home" = { |
| 32 | { device = "zroot/home"; | 45 | device = "zroot/home"; |
| 33 | fsType = "zfs"; | 46 | fsType = "zfs"; |
| 34 | }; | 47 | }; |
| 35 | 48 | ||
| 36 | fileSystems."/boot" = | 49 | fileSystems."/boot" = { |
| 37 | { device = "/dev/disk/by-uuid/BCF1-95FF"; | 50 | device = "/dev/disk/by-uuid/BCF1-95FF"; |
| 38 | fsType = "vfat"; | 51 | fsType = "vfat"; |
| 39 | options = [ "fmask=0022" "dmask=0022" ]; | 52 | options = [ |
| 40 | }; | 53 | "fmask=0022" |
| 41 | 54 | "dmask=0022" | |
| 42 | swapDevices = | ||
| 43 | [ { device = "/dev/disk/by-uuid/7e66a653-5438-486f-99c6-0a1a51ef7d96"; } | ||
| 44 | ]; | 55 | ]; |
| 56 | }; | ||
| 57 | |||
| 58 | swapDevices = [ | ||
| 59 | { device = "/dev/disk/by-uuid/7e66a653-5438-486f-99c6-0a1a51ef7d96"; } | ||
| 60 | ]; | ||
| 45 | 61 | ||
| 46 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking | 62 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking |
| 47 | # (the default) this is the recommended approach. When using systemd-networkd it's | 63 | # (the default) this is the recommended approach. When using systemd-networkd it's |
diff --git a/hosts/saklas/default.nix b/hosts/saklas/default.nix index 0ea3474..bd738ca 100644 --- a/hosts/saklas/default.nix +++ b/hosts/saklas/default.nix | |||
| @@ -1,4 +1,10 @@ | |||
| 1 | { config, lib, pkgs, inputs, ... }: | 1 | { |
| 2 | config, | ||
| 3 | lib, | ||
| 4 | pkgs, | ||
| 5 | inputs, | ||
| 6 | ... | ||
| 7 | }: | ||
| 2 | 8 | ||
| 3 | { | 9 | { |
| 4 | imports = [ | 10 | imports = [ |
| @@ -38,8 +44,17 @@ | |||
| 38 | wireless.enable = false; | 44 | wireless.enable = false; |
| 39 | 45 | ||
| 40 | firewall = { | 46 | firewall = { |
| 41 | allowedTCPPorts = [ 22 80 443 5222 5269 ]; | 47 | allowedTCPPorts = [ |
| 42 | allowedUDPPorts = [ 3478 51820 ]; | 48 | 22 |
| 49 | 80 | ||
| 50 | 443 | ||
| 51 | 5222 | ||
| 52 | 5269 | ||
| 53 | ]; | ||
| 54 | allowedUDPPorts = [ | ||
| 55 | 3478 | ||
| 56 | 51820 | ||
| 57 | ]; | ||
| 43 | }; | 58 | }; |
| 44 | }; | 59 | }; |
| 45 | 60 | ||
| @@ -52,10 +67,16 @@ | |||
| 52 | "95.217.18.52/32" | 67 | "95.217.18.52/32" |
| 53 | "2a01:4f9:c010:a653::1/64" | 68 | "2a01:4f9:c010:a653::1/64" |
| 54 | ]; | 69 | ]; |
| 55 | dns = [ "185.12.64.1" "185.12.64.2" ]; | 70 | dns = [ |
| 71 | "185.12.64.1" | ||
| 72 | "185.12.64.2" | ||
| 73 | ]; | ||
| 56 | routes = [ | 74 | routes = [ |
| 57 | { Destination = "172.31.1.1"; } | 75 | { Destination = "172.31.1.1"; } |
| 58 | { Gateway = "172.31.1.1"; GatewayOnLink = true; } | 76 | { |
| 77 | Gateway = "172.31.1.1"; | ||
| 78 | GatewayOnLink = true; | ||
| 79 | } | ||
| 59 | ]; | 80 | ]; |
| 60 | }; | 81 | }; |
| 61 | }; | 82 | }; |
| @@ -70,7 +91,10 @@ | |||
| 70 | }; | 91 | }; |
| 71 | 92 | ||
| 72 | # enable flakes and nix cli | 93 | # enable flakes and nix cli |
| 73 | nix.settings.experimental-features = [ "nix-command" "flakes" ]; | 94 | nix.settings.experimental-features = [ |
| 95 | "nix-command" | ||
| 96 | "flakes" | ||
| 97 | ]; | ||
| 74 | 98 | ||
| 75 | # user accounts | 99 | # user accounts |
| 76 | users.users.root.openssh.authorizedKeys.keys = [ | 100 | users.users.root.openssh.authorizedKeys.keys = [ |
| @@ -133,7 +157,11 @@ | |||
| 133 | 157 | ||
| 134 | "xmpp.vineetk.net" = { | 158 | "xmpp.vineetk.net" = { |
| 135 | group = config.services.prosody.group; | 159 | group = config.services.prosody.group; |
| 136 | extraDomainNames = [ "vineetk.net" "muc.vineetk.net" "u.vineetk.net" ]; | 160 | extraDomainNames = [ |
| 161 | "vineetk.net" | ||
| 162 | "muc.vineetk.net" | ||
| 163 | "u.vineetk.net" | ||
| 164 | ]; | ||
| 137 | reloadServices = [ "prosody" ]; | 165 | reloadServices = [ "prosody" ]; |
| 138 | }; | 166 | }; |
| 139 | }; | 167 | }; |
| @@ -142,11 +170,13 @@ | |||
| 142 | # I prefer doas over sudo for simplicity | 170 | # I prefer doas over sudo for simplicity |
| 143 | doas = { | 171 | doas = { |
| 144 | enable = true; | 172 | enable = true; |
| 145 | extraRules = [{ | 173 | extraRules = [ |
| 146 | users = [ "vin" ]; | 174 | { |
| 147 | keepEnv = true; | 175 | users = [ "vin" ]; |
| 148 | persist = true; | 176 | keepEnv = true; |
| 149 | }]; | 177 | persist = true; |
| 178 | } | ||
| 179 | ]; | ||
| 150 | }; | 180 | }; |
| 151 | 181 | ||
| 152 | sudo.enable = false; | 182 | sudo.enable = false; |
| @@ -169,12 +199,36 @@ | |||
| 169 | dns = { | 199 | dns = { |
| 170 | base_domain = "epistemia"; | 200 | base_domain = "epistemia"; |
| 171 | extra_records = [ | 201 | extra_records = [ |
| 172 | { name = "invidious.demiurge.epistemia"; type = "A"; value = "100.64.0.2"; } | 202 | { |
| 173 | { name = "llm.demiurge.epistemia"; type = "A"; value = "100.64.0.2"; } | 203 | name = "invidious.demiurge.epistemia"; |
| 174 | { name = "navidrome.demiurge.epistemia"; type = "A"; value = "100.64.0.2"; } | 204 | type = "A"; |
| 175 | { name = "redlib.demiurge.epistemia"; type = "A"; value = "100.64.0.2"; } | 205 | value = "100.64.0.2"; |
| 176 | { name = "sdui.demiurge.epistemia"; type = "A"; value = "100.64.0.2"; } | 206 | } |
| 177 | { name = "searx.demiurge.epistemia"; type = "A"; value = "100.64.0.2"; } | 207 | { |
| 208 | name = "llm.demiurge.epistemia"; | ||
| 209 | type = "A"; | ||
| 210 | value = "100.64.0.2"; | ||
| 211 | } | ||
| 212 | { | ||
| 213 | name = "navidrome.demiurge.epistemia"; | ||
| 214 | type = "A"; | ||
| 215 | value = "100.64.0.2"; | ||
| 216 | } | ||
| 217 | { | ||
| 218 | name = "redlib.demiurge.epistemia"; | ||
| 219 | type = "A"; | ||
| 220 | value = "100.64.0.2"; | ||
| 221 | } | ||
| 222 | { | ||
| 223 | name = "sdui.demiurge.epistemia"; | ||
| 224 | type = "A"; | ||
| 225 | value = "100.64.0.2"; | ||
| 226 | } | ||
| 227 | { | ||
| 228 | name = "searx.demiurge.epistemia"; | ||
| 229 | type = "A"; | ||
| 230 | value = "100.64.0.2"; | ||
| 231 | } | ||
| 178 | ]; | 232 | ]; |
| 179 | }; | 233 | }; |
| 180 | logtail.enabled = false; | 234 | logtail.enabled = false; |
| @@ -199,7 +253,7 @@ | |||
| 199 | ssl.cert = config.security.acme.certs."xmpp.vineetk.net".directory + "/full.pem"; | 253 | ssl.cert = config.security.acme.certs."xmpp.vineetk.net".directory + "/full.pem"; |
| 200 | ssl.key = config.security.acme.certs."xmpp.vineetk.net".directory + "/key.pem"; | 254 | ssl.key = config.security.acme.certs."xmpp.vineetk.net".directory + "/key.pem"; |
| 201 | 255 | ||
| 202 | muc = [{ domain = "muc.vineetk.net"; }]; | 256 | muc = [ { domain = "muc.vineetk.net"; } ]; |
| 203 | virtualHosts.vineetk = { | 257 | virtualHosts.vineetk = { |
| 204 | domain = "vineetk.net"; | 258 | domain = "vineetk.net"; |
| 205 | enabled = true; | 259 | enabled = true; |
| @@ -233,7 +287,7 @@ | |||
| 233 | locations."/" = { | 287 | locations."/" = { |
| 234 | proxyPass = "http://127.0.0.1:5232/"; | 288 | proxyPass = "http://127.0.0.1:5232/"; |
| 235 | extraConfig = '' | 289 | extraConfig = '' |
| 236 | proxy_pass_header Authorization; | 290 | proxy_pass_header Authorization; |
| 237 | ''; | 291 | ''; |
| 238 | }; | 292 | }; |
| 239 | }; | 293 | }; |
| @@ -321,52 +375,56 @@ | |||
| 321 | mailserver = { | 375 | mailserver = { |
| 322 | enable = true; | 376 | enable = true; |
| 323 | fqdn = "mail.vineetk.net"; | 377 | fqdn = "mail.vineetk.net"; |
| 324 | domains = [ "vineetk.net" "vinbiz.ca" "13f0.net" ]; | 378 | domains = [ |
| 379 | "vineetk.net" | ||
| 380 | "vinbiz.ca" | ||
| 381 | "13f0.net" | ||
| 382 | ]; | ||
| 325 | 383 | ||
| 326 | # A list of all login accounts. To create the password hashes, use | 384 | # A list of all login accounts. To create the password hashes, use |
| 327 | # nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' | 385 | # nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' |
| 328 | loginAccounts = { | 386 | loginAccounts = { |
| 329 | "vineet@vineetk.net" = { | 387 | "vineet@vineetk.net" = { |
| 330 | hashedPasswordFile = config.age.secrets.email_vineetk.path; | 388 | hashedPasswordFile = config.age.secrets.email_vineetk.path; |
| 331 | aliases = ["@vineetk.net"]; | 389 | aliases = [ "@vineetk.net" ]; |
| 332 | }; | 390 | }; |
| 333 | 391 | ||
| 334 | "kar@13f0.net" = { | 392 | "kar@13f0.net" = { |
| 335 | hashedPasswordFile = config.age.secrets.email_13f0.path; | 393 | hashedPasswordFile = config.age.secrets.email_13f0.path; |
| 336 | aliases = ["@13f0.net"]; | 394 | aliases = [ "@13f0.net" ]; |
| 337 | sieveScript = '' | 395 | sieveScript = '' |
| 338 | require [ "fileinto", "mailbox" ]; | 396 | require [ "fileinto", "mailbox" ]; |
| 339 | 397 | ||
| 340 | if address :matches [ "to", "cc" ] "announce@openbsd.org" { | 398 | if address :matches [ "to", "cc" ] "announce@openbsd.org" { |
| 341 | fileinto :create "openbsd_announce"; | 399 | fileinto :create "openbsd_announce"; |
| 342 | stop; | 400 | stop; |
| 343 | } | 401 | } |
| 344 | if address :matches [ "to", "cc" ] "arm@openbsd.org" { | 402 | if address :matches [ "to", "cc" ] "arm@openbsd.org" { |
| 345 | fileinto :create "openbsd_arm"; | 403 | fileinto :create "openbsd_arm"; |
| 346 | stop; | 404 | stop; |
| 347 | } | 405 | } |
| 348 | if address :matches [ "to", "cc" ] "misc@openbsd.org" { | 406 | if address :matches [ "to", "cc" ] "misc@openbsd.org" { |
| 349 | fileinto :create "openbsd_misc"; | 407 | fileinto :create "openbsd_misc"; |
| 350 | stop; | 408 | stop; |
| 351 | } | 409 | } |
| 352 | if address :matches [ "to", "cc" ] "misc@opensmtpd.org" { | 410 | if address :matches [ "to", "cc" ] "misc@opensmtpd.org" { |
| 353 | fileinto :create "opensmtpd_misc"; | 411 | fileinto :create "opensmtpd_misc"; |
| 354 | stop; | 412 | stop; |
| 355 | } | 413 | } |
| 356 | if address :matches [ "to", "cc" ] "oss-security@lists.openwall.com" { | 414 | if address :matches [ "to", "cc" ] "oss-security@lists.openwall.com" { |
| 357 | fileinto :create "oss_security"; | 415 | fileinto :create "oss_security"; |
| 358 | stop; | 416 | stop; |
| 359 | } | 417 | } |
| 360 | if address :matches [ "to", "cc" ] "tuhs@tuhs.org" { | 418 | if address :matches [ "to", "cc" ] "tuhs@tuhs.org" { |
| 361 | fileinto :create "tuhs"; | 419 | fileinto :create "tuhs"; |
| 362 | stop; | 420 | stop; |
| 363 | } | 421 | } |
| 364 | ''; | 422 | ''; |
| 365 | }; | 423 | }; |
| 366 | 424 | ||
| 367 | "vineet@vinbiz.ca" = { | 425 | "vineet@vinbiz.ca" = { |
| 368 | hashedPasswordFile = config.age.secrets.email_vinbiz.path; | 426 | hashedPasswordFile = config.age.secrets.email_vinbiz.path; |
| 369 | aliases = ["postmaster@vinbiz.ca"]; | 427 | aliases = [ "postmaster@vinbiz.ca" ]; |
| 370 | }; | 428 | }; |
| 371 | "suresh@vinbiz.ca".hashedPasswordFile = config.age.secrets.email_vinbiz.path; | 429 | "suresh@vinbiz.ca".hashedPasswordFile = config.age.secrets.email_vinbiz.path; |
| 372 | "revathy@vinbiz.ca".hashedPasswordFile = config.age.secrets.email_vinbiz.path; | 430 | "revathy@vinbiz.ca".hashedPasswordFile = config.age.secrets.email_vinbiz.path; |
