mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 17:49:07 +01:00
Replace deploy-rs with nh for remote push deployments
This commit is contained in:
parent
5c61459fe7
commit
fee1ddd9a9
5 changed files with 6 additions and 100 deletions
|
|
@ -17,26 +17,8 @@ let
|
|||
]
|
||||
++ lib.optional (lib.pathExists "${self}/users/seb/@${hostName}") "${self}/users/seb/@${hostName}";
|
||||
};
|
||||
|
||||
mkDeployNode = hostName: {
|
||||
hostname = "${hostName}.${
|
||||
self.nixosConfigurations.${hostName}.config.custom.networking.overlay.domain
|
||||
}";
|
||||
user = "root";
|
||||
interactiveSudo = true;
|
||||
profiles.system.path =
|
||||
inputs.deploy-rs.lib.x86_64-linux.activate.nixos
|
||||
self.nixosConfigurations.${hostName};
|
||||
};
|
||||
|
||||
hostNames = "${self}/hosts" |> self.lib.listDirectoryNames;
|
||||
in
|
||||
{
|
||||
flake = {
|
||||
nixosConfigurations = hostNames |> self.lib.genAttrs mkHost;
|
||||
|
||||
deploy.nodes = hostNames |> self.lib.genAttrs mkDeployNode;
|
||||
|
||||
checks = inputs.deploy-rs.lib |> lib.mapAttrs (_: deployLib: deployLib.deployChecks self.deploy);
|
||||
};
|
||||
flake.nixosConfigurations =
|
||||
"${self}/hosts" |> self.lib.listDirectoryNames |> self.lib.genAttrs mkHost;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue