diff options
Diffstat (limited to 'hosts/common.nix')
| -rw-r--r-- | hosts/common.nix | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/hosts/common.nix b/hosts/common.nix new file mode 100644 index 0000000..df9e6f0 --- /dev/null +++ b/hosts/common.nix @@ -0,0 +1,87 @@ +{ + inputs, + self, +}: let + inherit (inputs) getchoo home-manager nixpkgs nixpkgsUnstable nur ragenix; +in { + personal = { + system = "x86_64-linux"; + builder = nixpkgsUnstable.lib.nixosSystem; + + dir = ./.; + + modules = [ + ragenix.nixosModules.default + home-manager.nixosModules.home-manager + nur.nixosModules.nur + + self.nixosModules.getchoo + ../users/seth + + { + age = { + identityPaths = ["/etc/age/key"]; + secrets = let + baseDir = "${self}/secrets/shared"; + in { + rootPassword.file = "${baseDir}/rootPassword.age"; + sethPassword.file = "${baseDir}/sethPassword.age"; + }; + }; + + nixpkgs = { + overlays = [nur.overlay getchoo.overlays.default]; + config.allowUnfree = true; + }; + + nix = { + registry = { + getchoo.flake = getchoo; + nixpkgs.flake = nixpkgsUnstable; + }; + + settings = { + trusted-substituters = [ + "https://getchoo.cachix.org" + "https://nix-community.cachix.org" + "https://hercules-ci.cachix.org" + "https://wurzelpfropf.cachix.org" + ]; + + trusted-public-keys = [ + "getchoo.cachix.org-1:ftdbAUJVNaFonM0obRGgR5+nUmdLMM+AOvDOSx0z5tE=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "hercules-ci.cachix.org-1:ZZeDl9Va+xe9j+KqdzoBZMFJHVQ42Uu/c/1/KMC5Lw0=" + "wurzelpfropf.cachix.org-1:ilZwK5a6wJqVr7Fyrzp4blIEkGK+LJT0QrpWr1qBNq0=" + ]; + }; + }; + + getchoo.nixos.enable = true; + system.stateVersion = "23.05"; + } + ]; + + specialArgs = inputs; + }; + + server = { + builder = nixpkgs.lib.nixosSystem; + + dir = ./.; + + modules = [ + ragenix.nixosModules.default + ../modules/base + ../modules/nixos + ../modules/server + + { + getchoo.server.enable = true; + nix.registry.nixpkgs.flake = nixpkgs; + } + ]; + + specialArgs = inputs; + }; +} |
