init now automaticly imports all pools
This commit is contained in:
@@ -24,6 +24,9 @@ trap cleanup EXIT
|
||||
# Create the directory where sshd expects to find the host keys
|
||||
install -d -m755 "$temp/etc/ssh/"
|
||||
|
||||
diskKey=$(sops -d machines/$hostname/disk.key)
|
||||
echo "$diskKey" > /tmp/secret.key
|
||||
|
||||
ssh-keygen -f $temp/etc/ssh/"$hostname" -t ed25519 -N ""
|
||||
ssh-keygen -f $temp/etc/ssh/initrd -t ed25519 -N ""
|
||||
|
||||
@@ -36,9 +39,9 @@ chmod 600 "$temp/etc/ssh/initrd"
|
||||
if [ $# = 3 ]
|
||||
then
|
||||
nix run github:numtide/nixos-anywhere -- --extra-files "$temp" \
|
||||
--disk-encryption-keys /tmp/secret.key <(sops -d machines/$hostname/disk.key) --flake .#$hostname $3@$ipaddress
|
||||
--disk-encryption-keys /tmp/secret.key /tmp/secret.key --flake .#$hostname $3@$ipaddress
|
||||
|
||||
else
|
||||
nix run github:numtide/nixos-anywhere -- --extra-files "$temp" \
|
||||
--disk-encryption-keys /tmp/secret.key <(sops -d machines/$hostname/disk.key) --flake .#$hostname root@$ipaddress
|
||||
--disk-encryption-keys /tmp/secret.key /tmp/secret.key --flake .#$hostname root@$ipaddress
|
||||
fi
|
||||
Reference in New Issue
Block a user