mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 14:01:34 +01:00
Reduce repitition by extracting hostNames
This commit is contained in:
parent
10901fbdad
commit
81f27ce059
1 changed files with 4 additions and 2 deletions
|
|
@ -27,12 +27,14 @@ let
|
|||
inputs.deploy-rs.lib.x86_64-linux.activate.nixos
|
||||
self.nixosConfigurations.${hostname};
|
||||
};
|
||||
|
||||
hostNames = "${self}/hosts" |> lib'.listDirectoryNames;
|
||||
in
|
||||
{
|
||||
flake = {
|
||||
nixosConfigurations = "${self}/hosts" |> lib'.listDirectoryNames |> lib'.genAttrs mkHost;
|
||||
nixosConfigurations = hostNames |> lib'.genAttrs mkHost;
|
||||
|
||||
deploy.nodes = "${self}/hosts" |> lib'.listDirectoryNames |> lib'.genAttrs mkDeployNode;
|
||||
deploy.nodes = hostNames |> lib'.genAttrs mkDeployNode;
|
||||
|
||||
checks = inputs.deploy-rs.lib |> lib.mapAttrs (_: deployLib: deployLib.deployChecks self.deploy);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue