deploy: fix escaping and missing deps

This commit is contained in:
Jörg Thalheim 2022-08-13 10:28:24 +02:00
parent 367f2a0527
commit 56a7ad00d4

4
ci.nix
View file

@ -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