My dotfiles for my nixos machines and infra
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Improvements, wip

MrSnowy b8cb4fc0 3b66a745

+271 -130
+10 -7
.config/hypr/hyprland.conf
··· 52 52 exec-once = wl-paste --type image --watch cliphist store #Stores only image data 53 53 #exec-once = hyprpm reload -n 54 54 #exec-once = hyprctl plugin load $(find /nix/store -maxdepth 1 -wholename "*-hyprsplit-$(hyprctl version -j | jq -r .version)" -print -quit)/lib/libhyprsplit.so 55 - exec-once = hyprctl plugin load ${$LIB_HYPRSPLIT} 55 + # exec-once = hyprctl plugin load ${$LIB_HYPRSPLIT} 56 56 exec-once = ${$POLKIT_GNOME} 57 57 #exec-once = gentoo-pipewire-launcher 58 58 #exec-once = kwalletd5 & ··· 188 188 kb_layout = us, hu 189 189 kb_variant = 190 190 kb_model = 191 - kb_options = grp:alt_space_toggle 191 + kb_options = grp:alt_space_toggle 192 192 kb_rules = 193 193 194 194 follow_mouse = 1 ··· 201 201 } 202 202 203 203 # https://wiki.hyprland.org/Configuring/Variables/#gestures 204 - gestures { 205 - workspace_swipe = false 206 - } 204 + # gestures { 205 + # workspace_swipe = false 206 + # } 207 207 208 208 # Example per-device config 209 209 # See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more ··· 253 253 bind = $mainMod shift, up, movewindow, u 254 254 bind = $mainMod shift, down, movewindow, d 255 255 256 - $workspacevar = split:workspace 257 - $movetoworkspacevar = split:movetoworkspace 256 + # $workspacevar = split:workspace 257 + # $movetoworkspacevar = split:movetoworkspace 258 + 259 + $workspacevar = workspace 260 + $movetoworkspacevar = movetoworkspace 258 261 259 262 # Switch workspaces with mainMod + [0-9] 260 263 bind = $mainMod, 1, $workspacevar, 1
+48 -48
nixos/flake.lock
··· 42 42 "rust-overlay": "rust-overlay" 43 43 }, 44 44 "locked": { 45 - "lastModified": 1757377667, 46 - "narHash": "sha256-RR9KPGEKOzWtc3s9rjOAzn2GP6hgXcPlmbGNBw2MGcQ=", 45 + "lastModified": 1759348172, 46 + "narHash": "sha256-ZPUJX2ZA0ndcHndIA/S/nRESIJV0rifPr91SUpzJtEM=", 47 47 "owner": "chaotic-cx", 48 48 "repo": "nyx", 49 - "rev": "960a6988b572f2ed7ac453c43ae1fc4a05c297dd", 49 + "rev": "dd1af56ad79c965ee20c236ba6adbb2135ac02af", 50 50 "type": "github" 51 51 }, 52 52 "original": { ··· 134 134 ] 135 135 }, 136 136 "locked": { 137 - "lastModified": 1757256385, 138 - "narHash": "sha256-WK7tOhWwr15mipcckhDg2no/eSpM1nIh4C9le8HgHhk=", 137 + "lastModified": 1759261733, 138 + "narHash": "sha256-G104PUPKBgJmcu4NWs0LUaPpSOTD4jiq4mamLWu3Oc0=", 139 139 "owner": "nix-community", 140 140 "repo": "home-manager", 141 - "rev": "f35703b412c67b48e97beb6e27a6ab96a084cd37", 141 + "rev": "5a21f4819ee1be645f46d6b255d49f4271ef6723", 142 142 "type": "github" 143 143 }, 144 144 "original": { ··· 154 154 ] 155 155 }, 156 156 "locked": { 157 - "lastModified": 1757385184, 158 - "narHash": "sha256-LCxtQn9ajvOgGRbQIRUJgfP7clMGGvV1SDW1HcSb0zk=", 157 + "lastModified": 1759337100, 158 + "narHash": "sha256-CcT3QvZ74NGfM+lSOILcCEeU+SnqXRvl1XCRHenZ0Us=", 159 159 "owner": "nix-community", 160 160 "repo": "home-manager", 161 - "rev": "26993d87fd0d3b14f7667b74ad82235f120d986e", 161 + "rev": "004753ae6b04c4b18aa07192c1106800aaacf6c3", 162 162 "type": "github" 163 163 }, 164 164 "original": { ··· 234 234 ] 235 235 }, 236 236 "locked": { 237 - "lastModified": 1756891319, 238 - "narHash": "sha256-/e6OXxzbAj/o97Z1dZgHre4bNaVjapDGscAujSCQSbI=", 237 + "lastModified": 1758192433, 238 + "narHash": "sha256-CR6RnqEJSTiFgA6KQY4TTLUWbZ8RBnb+hxQqesuQNzQ=", 239 239 "owner": "hyprwm", 240 240 "repo": "hyprgraphics", 241 - "rev": "621e2e00f1736aa18c68f7dfbf2b9cff94b8cc4d", 241 + "rev": "c44e749dd611521dee940d00f7c444ee0ae4cfb7", 242 242 "type": "github" 243 243 }, 244 244 "original": { ··· 263 263 "xdph": "xdph" 264 264 }, 265 265 "locked": { 266 - "lastModified": 1757359491, 267 - "narHash": "sha256-NT6lAoNk8iv5SVG0rUCAIJlPSIvoyogvnEUGSfeeZ6I=", 266 + "lastModified": 1759399554, 267 + "narHash": "sha256-FsFugHj7He5siEcmoRUdMKHB8uMzyneK/fynPS57W4E=", 268 268 "owner": "hyprwm", 269 269 "repo": "Hyprland", 270 - "rev": "1e3a06560fa6b2d906f8ecc9ec41b50e9b034cef", 270 + "rev": "3bcfa94ee4189faaa4daf661949e88cf28c00d94", 271 271 "type": "github" 272 272 }, 273 273 "original": { ··· 356 356 ] 357 357 }, 358 358 "locked": { 359 - "lastModified": 1753819801, 360 - "narHash": "sha256-tHe6XeNeVeKapkNM3tcjW4RuD+tB2iwwoogWJOtsqTI=", 359 + "lastModified": 1757694755, 360 + "narHash": "sha256-j+w5QUUr2QT/jkxgVKecGYV8J7fpzXCMgzEEr6LG9ug=", 361 361 "owner": "hyprwm", 362 362 "repo": "hyprland-qtutils", 363 - "rev": "b308a818b9dcaa7ab8ccab891c1b84ebde2152bc", 363 + "rev": "5ffdfc13ed03df1dae5084468d935f0a3f2c9a4c", 364 364 "type": "github" 365 365 }, 366 366 "original": { ··· 457 457 ] 458 458 }, 459 459 "locked": { 460 - "lastModified": 1757230583, 461 - "narHash": "sha256-4uqu7sFPOaVTCogsxaGMgbzZ2vK40GVGMfUmrvK3/LY=", 460 + "lastModified": 1759217228, 461 + "narHash": "sha256-P13ExJlhMVkrc5LxZLNkIJZhjNYo3LLXnxDsUNrdnMQ=", 462 462 "owner": "Jovian-Experiments", 463 463 "repo": "Jovian-NixOS", 464 - "rev": "fc3960e6c32c9d4f95fff2ef84444284d24d3bea", 464 + "rev": "e52c15ab25f7dc68dde527c8df5bfa9d80d8e64f", 465 465 "type": "github" 466 466 }, 467 467 "original": { ··· 521 521 ] 522 522 }, 523 523 "locked": { 524 - "lastModified": 1757218147, 525 - "narHash": "sha256-IwOwN70HvoBNB2ckaROxcaCvj5NudNc52taPsv5wtLk=", 524 + "lastModified": 1759032422, 525 + "narHash": "sha256-WZf+FhebP2/1pK2np5xj/NuDjD6fXK2BHnq/tPUN18o=", 526 526 "owner": "nix-community", 527 527 "repo": "nix-index-database", 528 - "rev": "9b144dc3ef6e42b888c4190e02746aab13b0e97f", 528 + "rev": "ec7a78cb0e098832d8acac091a4df393259c4839", 529 529 "type": "github" 530 530 }, 531 531 "original": { ··· 536 536 }, 537 537 "nixpkgs": { 538 538 "locked": { 539 - "lastModified": 1757238739, 540 - "narHash": "sha256-ovEq9v+Xc+oQH1zvQo28rT/YVqMQK2TRgUcNanvo2Zk=", 539 + "lastModified": 1759147044, 540 + "narHash": "sha256-3ZPFytJOcLjTChljeaGgoaNj+tOqzgEpqZAvRe3bU90=", 541 541 "owner": "PedroHLC", 542 542 "repo": "nixpkgs", 543 - "rev": "6d8fca2c92488ff860524dd3400aa90a3310123e", 543 + "rev": "18e83bbe13aa50992777832b52bd0e0d8585fb3b", 544 544 "type": "github" 545 545 }, 546 546 "original": { ··· 552 552 }, 553 553 "nixpkgs-extra-unstable": { 554 554 "locked": { 555 - "lastModified": 1757034884, 556 - "narHash": "sha256-PgLSZDBEWUHpfTRfFyklmiiLBE1i1aGCtz4eRA3POao=", 555 + "lastModified": 1759386674, 556 + "narHash": "sha256-wg1Lz/1FC5Q13R+mM5a2oTV9TA9L/CHHTm3/PiLayfA=", 557 557 "owner": "NixOS", 558 558 "repo": "nixpkgs", 559 - "rev": "ca77296380960cd497a765102eeb1356eb80fed0", 559 + "rev": "625ad6366178f03acd79f9e3822606dd7985b657", 560 560 "type": "github" 561 561 }, 562 562 "original": { ··· 583 583 }, 584 584 "nixpkgs-stable": { 585 585 "locked": { 586 - "lastModified": 1757408970, 587 - "narHash": "sha256-aSgK4BLNFFGvDTNKPeB28lVXYqVn8RdyXDNAvgGq+k0=", 586 + "lastModified": 1759281824, 587 + "narHash": "sha256-FIBE1qXv9TKvSNwst6FumyHwCRH3BlWDpfsnqRDCll0=", 588 588 "owner": "NixOS", 589 589 "repo": "nixpkgs", 590 - "rev": "d179d77c139e0a3f5c416477f7747e9d6b7ec315", 590 + "rev": "5b5be50345d4113d04ba58c444348849f5585b4a", 591 591 "type": "github" 592 592 }, 593 593 "original": { ··· 599 599 }, 600 600 "nixpkgs-unstable": { 601 601 "locked": { 602 - "lastModified": 1757068644, 603 - "narHash": "sha256-NOrUtIhTkIIumj1E/Rsv1J37Yi3xGStISEo8tZm3KW4=", 602 + "lastModified": 1759036355, 603 + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", 604 604 "owner": "NixOS", 605 605 "repo": "nixpkgs", 606 - "rev": "8eb28adfa3dc4de28e792e3bf49fcf9007ca8ac9", 606 + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", 607 607 "type": "github" 608 608 }, 609 609 "original": { ··· 615 615 }, 616 616 "nixpkgs_2": { 617 617 "locked": { 618 - "lastModified": 1757068644, 619 - "narHash": "sha256-NOrUtIhTkIIumj1E/Rsv1J37Yi3xGStISEo8tZm3KW4=", 618 + "lastModified": 1758198701, 619 + "narHash": "sha256-7To75JlpekfUmdkUZewnT6MoBANS0XVypW6kjUOXQwc=", 620 620 "owner": "NixOS", 621 621 "repo": "nixpkgs", 622 - "rev": "8eb28adfa3dc4de28e792e3bf49fcf9007ca8ac9", 622 + "rev": "0147c2f1d54b30b5dd6d4a8c8542e8d7edf93b5d", 623 623 "type": "github" 624 624 }, 625 625 "original": { ··· 670 670 ] 671 671 }, 672 672 "locked": { 673 - "lastModified": 1757239681, 674 - "narHash": "sha256-E9spYi9lxm2f1zWQLQ7xQt8Xs2nWgr1T4QM7ZjLFphM=", 673 + "lastModified": 1758108966, 674 + "narHash": "sha256-ytw7ROXaWZ7OfwHrQ9xvjpUWeGVm86pwnEd1QhzawIo=", 675 675 "owner": "cachix", 676 676 "repo": "git-hooks.nix", 677 - "rev": "ab82ab08d6bf74085bd328de2a8722c12d97bd9d", 677 + "rev": "54df955a695a84cd47d4a43e08e1feaf90b1fd9b", 678 678 "type": "github" 679 679 }, 680 680 "original": { ··· 705 705 ] 706 706 }, 707 707 "locked": { 708 - "lastModified": 1757298987, 709 - "narHash": "sha256-yuFSw6fpfjPtVMmym51ozHYpJQ7SzVOTkk7tUv2JA0U=", 708 + "lastModified": 1759286284, 709 + "narHash": "sha256-JLdGGc4XDutzSD1L65Ni6Ye+oTm8kWfm0KTPMcyl7Y4=", 710 710 "owner": "oxalica", 711 711 "repo": "rust-overlay", 712 - "rev": "cfd63776bde44438ff2936f0c9194c79dd407a5f", 712 + "rev": "f6f2da475176bb7cff51faae8b3fe879cd393545", 713 713 "type": "github" 714 714 }, 715 715 "original": { ··· 799 799 "nixpkgs": "nixpkgs_4" 800 800 }, 801 801 "locked": { 802 - "lastModified": 1757395105, 803 - "narHash": "sha256-kwctEcCrHXZg80POmuOfqRqxSjy8bXhdBuNcRWaEpFA=", 802 + "lastModified": 1759378939, 803 + "narHash": "sha256-MWCIUqkxoMnvNYjooFiFHzlcZDBOp4DTXERe8xdEWoU=", 804 804 "owner": "0xc000022070", 805 805 "repo": "zen-browser-flake", 806 - "rev": "d7b87e67233fdb42e655600f3de4c2e8a13bc6a7", 806 + "rev": "3ac78827a82614c394e6f8fcc84c5cea9c3847f4", 807 807 "type": "github" 808 808 }, 809 809 "original": {
+23 -54
nixos/flake.nix
··· 28 28 url = "github:nix-community/nix-index-database"; 29 29 inputs.nixpkgs.follows = "nixpkgs-unstable"; 30 30 }; 31 + 32 + # modrinth-fix.url = "github:getchoo-contrib/nixpkgs/pkgs/modrinth-app/0.10.3"; 31 33 }; 32 34 33 35 outputs = 34 36 { 35 - self, 36 - nixpkgs-stable, 37 - nixpkgs-unstable, 38 - home-manager, 39 - zen-browser, 40 - chaotic, 41 - # fennec-flake, 42 - zed-editor, 43 - nixpkgs-extra-unstable, 44 - lsfg-vk-flake, 45 - nix-index, 46 37 ... 47 38 }@inputs: 48 39 { 49 - nixosConfigurations = { 50 40 41 + nixosConfigurations = { 51 42 Snowflake = 52 - let 53 - system = "x86_64-linux"; 54 - 55 - pkgs = import nixpkgs-stable { 56 - inherit system; 57 - config.allowUnfree = true; 58 - config.android_sdk.accept_license = true; 59 - }; 60 - 61 - pkgs-unstable = import nixpkgs-unstable { 62 - inherit system; 63 - config = { 64 - allowUnfree = true; 65 - android_sdk.accept_license = true; 66 - }; 67 - }; 68 - 69 - pkgs-extra-unstable = import nixpkgs-extra-unstable { 70 - inherit system; 71 - config.allowUnfree = true; 72 - }; 73 - 74 - in 75 - nixpkgs-unstable.lib.nixosSystem { 43 + let 44 + system = "x86_64-linux"; 45 + repos = import ./repos.nix { inherit inputs system; }; 46 + in 47 + # Set the default pkgs the system follows 48 + repos.pkgs-system { 76 49 inherit system; 77 50 51 + # This makes these args available in all other modules 78 52 specialArgs = { 79 - inherit pkgs-unstable; 80 - inherit pkgs-extra-unstable; 53 + inherit inputs; 81 54 }; 82 55 83 56 modules = [ 84 - 85 - ( 86 - { ... }: 87 - { 88 - nixpkgs.pkgs = import nixpkgs-unstable { 89 - inherit system; 90 - config.allowUnfree = true; 91 - config.android_sdk.accept_license = true; 92 - }; 93 - } 94 - ) 57 + { 58 + nixpkgs = { 59 + inherit system; 60 + config.allowUnfree = true; 61 + config.android_sdk.accept_license = true; 62 + }; 63 + } 95 64 96 65 ./system/configuration.nix # Main configuration 97 66 ./system/networking.nix # Network config 98 67 99 - chaotic.nixosModules.default 100 - lsfg-vk-flake.nixosModules.default 68 + inputs.chaotic.nixosModules.default 69 + inputs.lsfg-vk-flake.nixosModules.default 101 70 102 - home-manager.nixosModules.home-manager 71 + inputs.home-manager.nixosModules.home-manager 103 72 { 104 73 home-manager.useGlobalPkgs = true; 105 74 home-manager.useUserPackages = true; 106 75 home-manager.extraSpecialArgs = { 76 + inherit repos; 77 + # inherit pkgs-modrinth-fix; 107 78 inherit inputs; 108 - inherit pkgs-extra-unstable; 109 79 }; 110 80 home-manager.users = { 111 81 snowy = import ./home-manager/snowy.nix; ··· 113 83 } 114 84 ]; 115 85 }; 116 - 117 86 }; 118 87 }; 119 88 }
+11 -5
nixos/home-manager/snowy.nix
··· 2 2 inputs, 3 3 pkgs, 4 4 config, 5 - pkgs-extra-unstable, 5 + repos, 6 + # pkgs-modrinth-fix, 6 7 ... 7 8 }: 8 9 ··· 19 20 forgejo-actions-runner 20 21 ctop 21 22 inputs.zed-editor.packages."${pkgs.system}".zed-editor-bin 23 + # pkgs-modrinth-fix.modrinth-app 22 24 # zed stuffz 23 25 ente-desktop 24 26 bash-language-server 27 + hyprls 25 28 # shellcheck # for zed basher? 26 29 # vscodium 27 30 jetbrains.idea-ultimate ··· 32 35 33 36 fzf # for fish 34 37 hextazy 35 - pkgs-extra-unstable.grayjay 38 + repos.pkgs-extra-unstable.grayjay 36 39 37 40 # gaphor 38 41 d-spy ··· 41 44 rustup 42 45 gcc 43 46 just 47 + jujutsu 44 48 45 49 # silly game 46 50 clonehero ··· 61 65 hydralauncher 62 66 63 67 wineWowPackages.staging 68 + 69 + monocraft 64 70 # wine64 65 - pkgs-extra-unstable.hyprlandPlugins.hyprsplit 71 + # nixpkgs-extra-unstable.hyprlandPlugins.hyprsplit 66 72 ]; 67 73 68 74 systemd.user.sessionVariables = { 69 75 # Define some locations of some files, this seemed like the least wack way to do things. 70 76 POLKIT_GNOME = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; 71 - LIB_HYPRSPLIT = "${pkgs-extra-unstable.hyprlandPlugins.hyprsplit}/lib/libhyprsplit.so"; 77 + # LIB_HYPRSPLIT = "${nixpkgs-extra-unstable.hyprlandPlugins.hyprsplit}/lib/libhyprsplit.so"; 72 78 }; 73 79 74 80 programs = { ··· 141 147 enable = true; 142 148 143 149 plugins = [ 144 - pkgs-extra-unstable.hyprlandPlugins.hyprsplit 150 + # inputs.nixpkgs-extra-unstable.hyprlandPlugins.hyprsplit 145 151 ]; 146 152 147 153 settings = {
+43
nixos/repos.nix
··· 1 + { 2 + inputs, 3 + system, 4 + ... 5 + }: 6 + let 7 + inherit system; 8 + 9 + pkgs-extra-unstable = import inputs.nixpkgs-extra-unstable { 10 + inherit system; 11 + config.allowUnfree = true; 12 + config.android_sdk.accept_license = true; 13 + }; 14 + 15 + pks-unstable = import inputs.nixpkgs-unstable { 16 + inherit system; 17 + config.allowUnfree = true; 18 + config.android_sdk.accept_license = true; 19 + }; 20 + 21 + pkgs-stable = import inputs.nixpkgs-stable { 22 + inherit system; 23 + config.allowUnfree = true; 24 + config.android_sdk.accept_license = true; 25 + }; 26 + 27 + pkgs-system = inputs.nixpkgs-unstable.lib.nixosSystem; 28 + # { 29 + # modules = [ 30 + # { 31 + # nixpkgs = { 32 + # inherit system; 33 + # config.allowUnfree = true; 34 + # config.android_sdk.accept_license = true; 35 + # }; 36 + # } 37 + # ]; 38 + # }; 39 + 40 + in 41 + { 42 + inherit pkgs-extra-unstable pks-unstable pkgs-stable pkgs-system; 43 + }
+57
nixos/system/audio.nix
··· 1 + { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: 7 + { 8 + # # In order to save the sound card state on shutdown 9 + # hardware.alsa.enablePersistence = true; 10 + 11 + services = { 12 + pipewire = { 13 + enable = true; 14 + alsa.enable = true; 15 + alsa.support32Bit = true; 16 + pulse.enable = true; 17 + jack.enable = true; 18 + 19 + wireplumber = { 20 + enable = true; 21 + extraConfig = { 22 + "arctis-nova" = { 23 + "monitor.alsa.rules" = [ 24 + # { 25 + # matches = [ 26 + # { 27 + # "device.name" = "alsa_card.usb-SteelSeries_Arctis_Nova_7-00"; 28 + # } 29 + # ]; 30 + # actions = { 31 + # update-props = { 32 + # # "device.description" = "Puppy Headphones"; 33 + 34 + # }; 35 + # }; 36 + # } 37 + { 38 + matches = [ 39 + { 40 + "device.name" = "alsa_card.pci-0000_0f_00.4"; 41 + } 42 + ]; 43 + actions = { 44 + update-props = { 45 + "device.description" = "Speakers"; 46 + "audio.channels" = 6; 47 + "audio.position" = "FL,FR,FC,LFE,RL,RR"; 48 + }; 49 + }; 50 + } 51 + ]; 52 + }; 53 + }; 54 + }; 55 + }; 56 + }; 57 + }
+9 -13
nixos/system/configuration.nix
··· 14 14 imports = [ 15 15 # Include the results of the hardware scan. 16 16 ./hardware-configuration.nix 17 + ./audio.nix 17 18 ]; 18 19 19 20 # QUICKSHELl ··· 247 248 248 249 udev = { 249 250 enable = true; 250 - extraRules = ""; 251 + extraRules = '' 252 + ENV{ID_VENDOR_ID}=="303a", ENV{ID_MODEL_ID}=="1001", MODE="0777" 253 + ''; 251 254 packages = [ 252 255 pkgs.opentabletdriver 253 256 ]; 254 257 }; 255 258 256 - pipewire = { 257 - enable = true; 258 - alsa.enable = true; 259 - alsa.support32Bit = true; 260 - pulse.enable = true; 261 - jack.enable = true; 262 - wireplumber.enable = true; 263 - }; 264 - 265 259 greetd = { 266 260 enable = true; 267 261 settings = { ··· 400 394 #package = unstable.hyprland; 401 395 }; 402 396 397 + niri.enable = true; 398 + 403 399 wireshark = { 404 400 enable = true; 405 401 dumpcap.enable = true; ··· 520 516 mangohud 521 517 mangojuice 522 518 523 - rofi-wayland 519 + rofi 524 520 mako 525 521 libnotify 526 522 playerctl ··· 541 537 # mpv 542 538 pavucontrol 543 539 544 - niri 540 + # niri 545 541 xwayland-satellite 546 542 xdg-desktop-portal-gnome 547 543 ··· 581 577 p2pool 582 578 #keyguard 583 579 bitwarden-desktop 584 - devenv 580 + # devenv 585 581 # heroic 586 582 # stremio 587 583 # grayjay
+11
server/containers/main.nix
··· 1 + { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: 7 + { 8 + imports = [ 9 + # ./nixos-mailserver.nix 10 + ]; 11 + }
+55
server/containers/nixos-mailserver.nix
··· 1 + { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: 7 + 8 + let 9 + release = "nixos-25.05"; 10 + 11 + # Import NixOS Mailserver module 12 + mailserver = import ( 13 + builtins.fetchTarball { 14 + url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/${release}/nixos-mailserver-${release}.tar.gz"; 15 + sha256 = "1qn5fg0h62r82q7xw54ib9wcpflakix2db2mahbicx540562la1y"; 16 + # To get the sha256 of the nixos-mailserver tarball, we can use the nix-prefetch-url command: 17 + # release="nixos-25.05"; nix-prefetch-url "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/${release}/nixos-mailserver-${release}.tar.gz" --unpack 18 + } 19 + ); 20 + in 21 + { 22 + containers.mailserver = { 23 + autoStart = true; 24 + privateNetwork = false; 25 + 26 + config = { 27 + imports = [ mailserver ]; 28 + 29 + mailserver = { 30 + enable = true; 31 + # stateVersion = 3; 32 + fqdn = "mail.mrsnowy.dev"; 33 + domains = [ "mrsnowy.dev" ]; 34 + 35 + # A list of all login accounts. To create the password hashes, use 36 + # nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' 37 + loginAccounts = { 38 + "snow@mrsnowy.dev" = { 39 + hashedPassword = "$2b$05$PXkzgulA1RTIYtwZVYcgpObsJNzhF0pSrPTnnY31Ba/7xPTZO54iy"; 40 + # hashedPasswordFile = "/a/file/containing/a/hashed/password"; 41 + aliases = [ "me@mrsnowy.dev" ]; 42 + }; 43 + # "user2@example.com" = { ... }; 44 + }; 45 + 46 + # Use Let's Encrypt certificates. Note that this needs to set up a stripped 47 + # down nginx and opens port 80. 48 + certificateScheme = "acme-nginx"; 49 + }; 50 + 51 + security.acme.acceptTerms = true; 52 + security.acme.defaults.email = "security@example.com"; 53 + }; 54 + }; 55 + }
+2
server/flake.nix
··· 34 34 35 35 modules = [ 36 36 ./system/configuration.nix 37 + ./containers/main.nix 37 38 # <nixpkgs/nixos/modules/profiles/minimal.nix> 38 39 "${nixpkgs}/nixos/modules/profiles/minimal.nix" 39 40 # ./lxd-config.nix ··· 59 60 sshUser = "snow"; # non-root user with access 60 61 user = "root"; 61 62 interacticeSudo = true; 63 + remoteBuild = true; 62 64 path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.snow-den; 63 65 }; 64 66 };
+1 -3
server/home-manager/apps/fish.nix
··· 39 39 if status is-interactive 40 40 set -xg fish_color_command blue 41 41 echo "Welcome to $(whoami)@$(hostname)!" 42 - echo "---" 43 - echo "Current generations:" 44 - listgens 45 42 echo "" 43 + fastfetch 46 44 end 47 45 ''; 48 46
+1
server/system/configuration.nix
··· 52 52 53 53 # Use grub so it works on both EFI and BOOT 54 54 boot = { 55 + enableContainers = true; 55 56 # kernelPackages = pkgs.linuxKernel.packages.linux_hardened; 56 57 kernelModules = [ 57 58 # "overlay2"