flake.nix: Add app to locally build remote deployment
This commit is contained in:
parent
c55bc54b35
commit
e1cda094c0
12
flake.nix
12
flake.nix
|
@ -109,6 +109,18 @@
|
|||
)
|
||||
self.nixosConfigurations);
|
||||
|
||||
deploy-local = lib.recurseIntoAttrs (lib.mapAttrs
|
||||
(hostname: machine: pkgs.writeShellScript "deploy-local-${hostname}" ''
|
||||
${pkgs.nixos-rebuild.override { nix = pkgs.nixFlakes; }}/bin/nixos-rebuild \
|
||||
switch \
|
||||
--flake .#${hostname} \
|
||||
-L \
|
||||
--build-host localhost \
|
||||
--target-host root@${machine.config.deployment.targetHost} \
|
||||
--use-substitutes
|
||||
'')
|
||||
self.nixosConfigurations);
|
||||
|
||||
unlock = lib.recurseIntoAttrs (lib.mapAttrs
|
||||
(hostname: machine:
|
||||
let
|
||||
|
|
Loading…
Reference in a new issue