summaryrefslogtreecommitdiff
path: root/parts/deploy.nix
diff options
context:
space:
mode:
Diffstat (limited to 'parts/deploy.nix')
-rw-r--r--parts/deploy.nix34
1 files changed, 1 insertions, 33 deletions
diff --git a/parts/deploy.nix b/parts/deploy.nix
index bebf25c..9bd98b2 100644
--- a/parts/deploy.nix
+++ b/parts/deploy.nix
@@ -1,8 +1,6 @@
{
self,
- inputs,
lib,
- withSystem,
...
}: let
systems = ["atlas" "p-body"];
@@ -11,39 +9,9 @@
lib.filterAttrs
(n: _: builtins.elem n systems)
self.nixosConfigurations;
-
- deployPkgs = import inputs.nixpkgs rec {
- system = "x86_64-linux";
- overlays = [
- inputs.deploy-rs.overlay
- (_: prev: {
- deploy-rs = {
- inherit (withSystem system (p: p.pkgs)) deploy-rs;
- inherit (prev.deploy-rs) lib;
- };
- })
- ];
- };
-
- mkNodes = hosts: let
- inherit (builtins) attrNames listToAttrs map;
- vals =
- map (name: let
- system = self.nixosConfigurations.${name};
- in {
- inherit name;
- value = {
- sshUser = "root";
- hostname = system.config.networking.hostName;
- profiles.system.path = deployPkgs.deploy-rs.lib.activate.nixos system;
- };
- })
- (attrNames hosts);
- in
- listToAttrs vals;
in {
flake.deploy = {
remoteBuild = true;
- nodes = mkNodes deployedSystems;
+ nodes = self.lib.utils.mkDeployNodes deployedSystems;
};
}