diff --git a/flake.nix b/flake.nix index 9535de2..b7ef769 100644 --- a/flake.nix +++ b/flake.nix @@ -59,6 +59,7 @@ system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; }; lib = nixpkgs.lib; + hosts = import hosts/hosts.nix { inherit inputs; }; in { @@ -67,110 +68,110 @@ nixosConfigurations = (import ./hosts inputs); - colmena = - lib.recursiveUpdate - (builtins.mapAttrs (k: v: { imports = v._module.args.modules; }) self.nixosConfigurations) - { - meta = { - nixpkgs = import nixpkgs { - system = "x86_64-linux"; - overlays = [ ]; - }; - nodeNixpkgs = builtins.mapAttrs (_: v: v.pkgs) self.nixosConfigurations; - nodeSpecialArgs = builtins.mapAttrs (_: v: v._module.specialArgs) self.nixosConfigurations; - }; + colmena = lib.recursiveUpdate (builtins.mapAttrs (k: v: { + imports = v._module.args.modules; + }) self.nixosConfigurations) hosts; + # { + # meta = { + # nixpkgs = import nixpkgs { + # system = "x86_64-linux"; + # overlays = [ ]; + # }; + # nodeNixpkgs = builtins.mapAttrs (_: v: v.pkgs) self.nixosConfigurations; + # nodeSpecialArgs = builtins.mapAttrs (_: v: v._module.specialArgs) self.nixosConfigurations; + # }; - arr.deployment = { - targetHost = "192.168.1.189"; - tags = [ - "lxc" - "bacco" - "arr" - ]; - }; + # arr.deployment = { + # targetHost = "192.168.1.189"; + # tags = [ + # "lxc" + # "bacco" + # "arr" + # ]; + # }; - caddy.deployment = { - targetHost = "192.168.1.150"; - tags = [ - "lxc" - "bacco" - "arr" - "auth" - "metrics" - "nextcloud" - "portainer" - "vaultwarden" - ]; - }; + # caddy.deployment = { + # targetHost = "192.168.1.150"; + # tags = [ + # "lxc" + # "bacco" + # "arr" + # "auth" + # "metrics" + # "nextcloud" + # "portainer" + # "vaultwarden" + # ]; + # }; - metrics.deployment = { - targetHost = "192.168.1.152"; - tags = [ - "lxc" - "bacco" - "metrics" - ]; - }; + # metrics.deployment = { + # targetHost = "192.168.1.152"; + # tags = [ + # "lxc" + # "bacco" + # "metrics" + # ]; + # }; - nextcloud.deployment = { - targetHost = "192.168.1.103"; - tags = [ - "lxc" - "bacco" - "nextcloud" - ]; - }; + # nextcloud.deployment = { + # targetHost = "192.168.1.103"; + # tags = [ + # "lxc" + # "bacco" + # "nextcloud" + # ]; + # }; - vaultwarden.deployment = { - targetHost = "192.168.1.154"; - tags = [ - "lxc" - "bacco" - "vaultwarden" - ]; - }; + # vaultwarden.deployment = { + # targetHost = "192.168.1.154"; + # tags = [ + # "lxc" + # "bacco" + # "vaultwarden" + # ]; + # }; - plex.deployment = { - targetHost = "192.168.1.155"; - tags = [ - "lxc" - "node" - ]; - }; + # plex.deployment = { + # targetHost = "192.168.1.155"; + # tags = [ + # "lxc" + # "node" + # ]; + # }; - portainer.deployment = { - targetHost = "192.168.1.156"; - tags = [ - "lxc" - "node" - "portainer" - ]; - }; + # portainer.deployment = { + # targetHost = "192.168.1.156"; + # tags = [ + # "lxc" + # "node" + # "portainer" + # ]; + # }; - authentik.deployment = { - targetHost = "192.168.1.157"; - tags = [ - "lxc" - "node" - "auth" - ]; - }; + # authentik.deployment = { + # targetHost = "192.168.1.157"; + # tags = [ + # "lxc" + # "node" + # "auth" + # ]; + # }; - colmena.deployment = { - targetHost = "192.168.1.158"; - tags = [ - "lxc" - "node" - ]; - }; + # colmena.deployment = { + # targetHost = "192.168.1.158"; + # tags = [ + # "lxc" + # "node" + # ]; + # }; - deadbeef.deployment = { - allowLocalDeployment = true; - targetHost = null; - tags = [ "local" ]; - }; + # deadbeef.deployment = { + # allowLocalDeployment = true; + # targetHost = null; + # tags = [ "local" ]; + # }; - }; + # }; devShells.${system}.default = pkgs.mkShell { buildInputs = with pkgs; [ diff --git a/hosts/hosts.nix b/hosts/hosts.nix new file mode 100644 index 0000000..1cde5cd --- /dev/null +++ b/hosts/hosts.nix @@ -0,0 +1,102 @@ +{ inputs, ... }: +{ + meta = { + nixpkgs = import inputs.nixpkgs { + system = "x86_64-linux"; + overlays = [ ]; + }; + nodeNixpkgs = builtins.mapAttrs (_: v: v.pkgs) inputs.self.nixosConfigurations; + nodeSpecialArgs = builtins.mapAttrs (_: v: v._module.specialArgs) inputs.self.nixosConfigurations; + }; + + arr.deployment = { + targetHost = "192.168.1.189"; + tags = [ + "lxc" + "bacco" + "arr" + ]; + }; + + caddy.deployment = { + targetHost = "192.168.1.150"; + tags = [ + "lxc" + "bacco" + "arr" + "auth" + "metrics" + "nextcloud" + "portainer" + "vaultwarden" + ]; + }; + + metrics.deployment = { + targetHost = "192.168.1.152"; + tags = [ + "lxc" + "bacco" + "metrics" + ]; + }; + + nextcloud.deployment = { + targetHost = "192.168.1.103"; + tags = [ + "lxc" + "bacco" + "nextcloud" + ]; + }; + + vaultwarden.deployment = { + targetHost = "192.168.1.154"; + tags = [ + "lxc" + "bacco" + "vaultwarden" + ]; + }; + + plex.deployment = { + targetHost = "192.168.1.155"; + tags = [ + "lxc" + "node" + ]; + }; + + portainer.deployment = { + targetHost = "192.168.1.156"; + tags = [ + "lxc" + "node" + "portainer" + ]; + }; + + authentik.deployment = { + targetHost = "192.168.1.157"; + tags = [ + "lxc" + "node" + "auth" + ]; + }; + + colmena.deployment = { + targetHost = "192.168.1.158"; + tags = [ + "lxc" + "node" + ]; + }; + + deadbeef.deployment = { + allowLocalDeployment = true; + targetHost = null; + tags = [ "local" ]; + }; + +}