deploy: fix escaping and missing deps
This commit is contained in:
parent
367f2a0527
commit
56a7ad00d4
1 changed files with 3 additions and 1 deletions
4
ci.nix
4
ci.nix
|
@ -5,6 +5,7 @@
|
|||
let
|
||||
self = builtins.getFlake (toString ./.);
|
||||
nixpkgs = self.inputs.nixpkgs;
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
effects = self.inputs.hercules-ci-effects.lib.withPkgs nixpkgs.legacyPackages.x86_64-linux;
|
||||
|
||||
deployNixOS = args@{
|
||||
|
@ -19,7 +20,8 @@ let
|
|||
effectScript = ''
|
||||
umask 077 # so ssh does not complain about key permissions
|
||||
readSecretString deploy .sshKey > deploy-key
|
||||
ssh -i deploy-key root@"$hostname" "$(nix-store -r $drv)/bin/switch-to-configuration $action"
|
||||
|
||||
${pkgs.openssh}/bin/ssh -i deploy-key root@"$hostname" "\$(nix-store -r $drv)/bin/switch-to-configuration switch"
|
||||
'';
|
||||
});
|
||||
in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue