mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-11-09 18:47:02 +00:00
morph: add proxy
This commit is contained in:
parent
00d7c22d34
commit
92d8273077
1 changed files with 9 additions and 0 deletions
|
@ -92,6 +92,15 @@
|
||||||
ssh root@$ip NIXOS_INSTALL_BOOTLOADER=1 nixos-enter --root /mnt -- /run/current-system/bin/switch-to-configuration boot
|
ssh root@$ip NIXOS_INSTALL_BOOTLOADER=1 nixos-enter --root /mnt -- /run/current-system/bin/switch-to-configuration boot
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
proxy = sh ''
|
||||||
|
export SSH_CONFIG_FILE="${sshConfig}"
|
||||||
|
ip="$(nix eval --raw ".#nixosConfigurations.\"$1\".config.sconfig.morph.deployment.targetHost")"
|
||||||
|
shift
|
||||||
|
set -- nix run "$@"
|
||||||
|
nix copy --to ssh://$ip "${flake}"
|
||||||
|
exec ssh -t -oForwardAgent=yes "$ip" "cd ${flake}; $@"
|
||||||
|
'';
|
||||||
|
|
||||||
push = sh ''
|
push = sh ''
|
||||||
exec "${morph}/bin/morph" push ${morph-config} "$@"
|
exec "${morph}/bin/morph" push ${morph-config} "$@"
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue