flake.nix: remove explicit builders
there are better ways to use builders
This commit is contained in:
parent
2df10730b1
commit
af83724eb3
11
flake.nix
11
flake.nix
|
@ -74,17 +74,10 @@
|
||||||
# Can be run with nix run c3d2#deploy-…
|
# Can be run with nix run c3d2#deploy-…
|
||||||
{ name
|
{ name
|
||||||
, host
|
, host
|
||||||
# remote builders to pass
|
|
||||||
, builders ? null
|
|
||||||
}:
|
}:
|
||||||
let target = "root@${host}";
|
let target = "root@${host}";
|
||||||
rebuildArg =
|
rebuildArg =
|
||||||
"--flake ${self}#${name}" +
|
"--flake ${self}#${name}";
|
||||||
(if builders != null
|
|
||||||
then " --builders \"" +
|
|
||||||
builtins.concatStringsSep " " builders +
|
|
||||||
"\""
|
|
||||||
else "");
|
|
||||||
in pkgs.writeScriptBin "${name}-nixos-rebuild" ''
|
in pkgs.writeScriptBin "${name}-nixos-rebuild" ''
|
||||||
#!${pkgs.runtimeShell} -e
|
#!${pkgs.runtimeShell} -e
|
||||||
nix-copy-closure --to ${target} ${secrets}
|
nix-copy-closure --to ${target} ${secrets}
|
||||||
|
@ -146,8 +139,6 @@
|
||||||
"${name}-nixos-rebuild" = mkDeploy ({
|
"${name}-nixos-rebuild" = mkDeploy ({
|
||||||
inherit name;
|
inherit name;
|
||||||
host = getHostAddr name;
|
host = getHostAddr name;
|
||||||
} // nixpkgs.lib.optionalAttrs (hostRegistry.hosts.${name} ? builders) {
|
|
||||||
inherit (hostRegistry.hosts.${name}) builders;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
"${name}-nixos-rebuild-local" =
|
"${name}-nixos-rebuild-local" =
|
||||||
|
|
|
@ -20,7 +20,6 @@ rec {
|
||||||
ether = "dc:a6:32:31:b6:32";
|
ether = "dc:a6:32:31:b6:32";
|
||||||
publicKey =
|
publicKey =
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE9RKlt+mIew5epxHt7Gab44yFOdeD+L/EhhA6Ospzyq";
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE9RKlt+mIew5epxHt7Gab44yFOdeD+L/EhhA6Ospzyq";
|
||||||
builders = [ "ssh://client@172.22.99.110" ];
|
|
||||||
wol = true;
|
wol = true;
|
||||||
ip4 = "pulsebert.hq.c3d2.de";
|
ip4 = "pulsebert.hq.c3d2.de";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue