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
|
let
|
||||||
self = builtins.getFlake (toString ./.);
|
self = builtins.getFlake (toString ./.);
|
||||||
nixpkgs = self.inputs.nixpkgs;
|
nixpkgs = self.inputs.nixpkgs;
|
||||||
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||||
effects = self.inputs.hercules-ci-effects.lib.withPkgs nixpkgs.legacyPackages.x86_64-linux;
|
effects = self.inputs.hercules-ci-effects.lib.withPkgs nixpkgs.legacyPackages.x86_64-linux;
|
||||||
|
|
||||||
deployNixOS = args@{
|
deployNixOS = args@{
|
||||||
|
@ -19,7 +20,8 @@ let
|
||||||
effectScript = ''
|
effectScript = ''
|
||||||
umask 077 # so ssh does not complain about key permissions
|
umask 077 # so ssh does not complain about key permissions
|
||||||
readSecretString deploy .sshKey > deploy-key
|
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
|
in
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue