mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-11-09 18:47:02 +00:00
morph: copy ssh key
This commit is contained in:
parent
c1d7638ad2
commit
d101e50318
1 changed files with 3 additions and 2 deletions
|
@ -88,9 +88,10 @@ in
|
||||||
'';
|
'';
|
||||||
livecd-deploy = sh ''
|
livecd-deploy = sh ''
|
||||||
config=".#nixosConfigurations.\"$1\".config"
|
config=".#nixosConfigurations.\"$1\".config"
|
||||||
nix build "$config.system.build.toplevel" --out-link "$(mktemp -d)/result"
|
|
||||||
sys="$(nix eval --raw "$config.system.build.toplevel")"
|
|
||||||
ip="$(nix eval --raw "$config.sconfig.morph.deployment.targetHost")"
|
ip="$(nix eval --raw "$config.sconfig.morph.deployment.targetHost")"
|
||||||
|
ssh-copy-id root@$ip
|
||||||
|
sys="$(nix eval --raw "$config.system.build.toplevel")"
|
||||||
|
nix build "$config.system.build.toplevel" --out-link "$(mktemp -d)/result"
|
||||||
nix copy --to ssh://root@$ip?remote-store=local?root=/mnt "$sys"
|
nix copy --to ssh://root@$ip?remote-store=local?root=/mnt "$sys"
|
||||||
ssh root@$ip nix-env --store /mnt -p /mnt/nix/var/nix/profiles/system --set "$sys"
|
ssh root@$ip nix-env --store /mnt -p /mnt/nix/var/nix/profiles/system --set "$sys"
|
||||||
ssh root@$ip mkdir /mnt/etc
|
ssh root@$ip mkdir /mnt/etc
|
||||||
|
|
Loading…
Reference in a new issue