move stuff to parts dir
This commit is contained in:
parent
a7b8dd7141
commit
e868b5913f
6 changed files with 10 additions and 5 deletions
37
parts/deploy.nix
Normal file
37
parts/deploy.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
lib,
|
||||
self,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
systems = ["etna"];
|
||||
|
||||
getDeploy = pkgs:
|
||||
(pkgs.appendOverlays [
|
||||
inputs.deploy-rs.overlay
|
||||
(_: prev: {
|
||||
deploy-rs = {
|
||||
inherit (pkgs) deploy-rs;
|
||||
inherit (prev.deploy-rs) lib;
|
||||
};
|
||||
})
|
||||
])
|
||||
.deploy-rs;
|
||||
|
||||
toDeployNode = hostname: system: {
|
||||
inherit hostname;
|
||||
sshUser = "root";
|
||||
|
||||
profiles.system.path = let deploy = getDeploy system.pkgs; in deploy.lib.activate.nixos system;
|
||||
};
|
||||
in {
|
||||
flake = {
|
||||
deploy = {
|
||||
remoteBuild = true;
|
||||
fastConnection = false;
|
||||
nodes = lib.mapAttrs toDeployNode (lib.getAttrs systems self.nixosConfigurations);
|
||||
};
|
||||
|
||||
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) inputs.deploy-rs.lib;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue