Configure remote deployment with deploy-rs

This commit is contained in:
SebastianStork 2024-09-06 17:26:22 +02:00
parent 6fe9cf2adc
commit 188a9b4e24
8 changed files with 117 additions and 19 deletions

View file

@ -17,4 +17,8 @@
'';
};
};
flake.checks = builtins.mapAttrs (
_: deployLib: deployLib.deployChecks self.deploy
) inputs.deploy-rs.lib;
}

View file

@ -1,13 +1,23 @@
{ inputs, ... }:
{
perSystem =
{ pkgs, ... }:
{ pkgs, system, ... }:
{
devShells.sops = pkgs.mkShell {
packages = [
pkgs.sops
pkgs.age
pkgs.ssh-to-age
];
devShells = {
default = pkgs.mkShell {
packages = [
pkgs.nh
inputs.deploy-rs.defaultPackage.${system}
];
};
sops = pkgs.mkShell {
packages = [
pkgs.sops
pkgs.age
pkgs.ssh-to-age
];
};
};
};
}

View file

@ -25,13 +25,20 @@ let
);
};
};
in
{
flake.nixosConfigurations = lib.mkMerge [
(mkHost "north" unstable)
(mkHost "inspiron" unstable)
(mkHost "stratus" stable)
(mkHost "installer" stable)
];
flake = {
nixosConfigurations = lib.mkMerge [
(mkHost "north" unstable)
(mkHost "inspiron" unstable)
(mkHost "stratus" stable)
(mkHost "installer" stable)
];
deploy.nodes.stratus = {
hostname = "stratus";
sshUser = "root";
profiles.system.path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.stratus;
};
};
}