diff options
| -rw-r--r-- | lib/deploy.nix (renamed from systems/deploy.nix) | 9 | ||||
| -rw-r--r-- | systems/default.nix | 16 |
2 files changed, 15 insertions, 10 deletions
diff --git a/systems/deploy.nix b/lib/deploy.nix index fbf20d3..fa15dc6 100644 --- a/systems/deploy.nix +++ b/lib/deploy.nix @@ -1,10 +1,9 @@ { lib, inputs, - self, ... }: let - targets = ["atlas"]; + inherit (inputs) self; configurations = self.nixosConfigurations // self.darwinConfigurations; getDeploy = pkgs: @@ -36,9 +35,5 @@ deploy.lib.activate.${type} system; }; in { - flake.deploy = { - remoteBuild = true; - fastConnection = false; - nodes = lib.mapAttrs toDeployNode (lib.getAttrs targets configurations); - }; + mapNodes = targets: lib.mapAttrs toDeployNode (lib.getAttrs targets configurations); } diff --git a/systems/default.nix b/systems/default.nix index e0fa49b..7160c96 100644 --- a/systems/default.nix +++ b/systems/default.nix @@ -1,6 +1,8 @@ -{inputs, ...}: { - imports = [./deploy.nix]; - +{ + inputs, + self, + ... +}: { configurations = { nixos = { builder = inputs.nixpkgs.lib.nixosSystem; @@ -34,4 +36,12 @@ }; }; }; + + flake.deploy = { + remoteBuild = true; + fastConnection = false; + nodes = self.lib.deploy.mapNodes [ + "atlas" + ]; + }; } |
