update disko
This commit is contained in:
parent
3e2a756261
commit
4688ce4145
2 changed files with 10 additions and 12 deletions
|
@ -14,15 +14,23 @@ sudo mkdir /tmp/drive
|
||||||
sudo cryptsetup luksOpen /dev/${drive}3 usb-luks
|
sudo cryptsetup luksOpen /dev/${drive}3 usb-luks
|
||||||
sudo mount /dev/mapper/usb-luks /tmp/drive
|
sudo mount /dev/mapper/usb-luks /tmp/drive
|
||||||
gpg --import /tmp/drive/gpg/albert@sysctl.io/privkey.asc
|
gpg --import /tmp/drive/gpg/albert@sysctl.io/privkey.asc
|
||||||
|
sudo umount /tmp/drive
|
||||||
sudo rmdir /tmp/drive
|
sudo rmdir /tmp/drive
|
||||||
|
sudo cryptsetup luksClose /dev/mapper/usb-luks
|
||||||
echo -e "5\ny\n" | gpg --command-fd 0 --expert --edit-key albert@sysctl.io trust
|
echo -e "5\ny\n" | gpg --command-fd 0 --expert --edit-key albert@sysctl.io trust
|
||||||
|
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
||||||
# Setup SOPS
|
# Setup SOPS
|
||||||
|
echo "!!!!!"
|
||||||
|
echo "!!!!!"
|
||||||
|
echo "!!!!!"
|
||||||
echo "!!!!! Copy this key to .sops.yaml: "
|
echo "!!!!! Copy this key to .sops.yaml: "
|
||||||
|
echo "!!!!!"
|
||||||
|
echo "!!!!!"
|
||||||
|
echo "!!!!!"
|
||||||
sudo ssh-to-pgp \
|
sudo ssh-to-pgp \
|
||||||
-comment "Generated `ddate`" \
|
-comment "Generated `date +%Y.%m.%d`" \
|
||||||
-email "root@`hostname`" \
|
-email "root@`hostname`" \
|
||||||
-i /etc/ssh/ssh_host_rsa_key \
|
-i /etc/ssh/ssh_host_rsa_key \
|
||||||
-o /etc/nixos/git/keys/hosts/$(hostname).asc
|
-o /etc/nixos/git/keys/hosts/$(hostname).asc
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
{
|
{
|
||||||
name = "LUKS";
|
name = "LUKS";
|
||||||
start = "550MiB";
|
start = "550MiB";
|
||||||
end = "-64GiB";
|
end = "100%";
|
||||||
content = {
|
content = {
|
||||||
type = "luks";
|
type = "luks";
|
||||||
name = "ROOT";
|
name = "ROOT";
|
||||||
|
@ -51,16 +51,6 @@
|
||||||
}; # content.content
|
}; # content.content
|
||||||
}; # content
|
}; # content
|
||||||
} # partition 2 (/ BTRFS)
|
} # partition 2 (/ BTRFS)
|
||||||
{
|
|
||||||
name = "SWAP";
|
|
||||||
start = "-64GiB";
|
|
||||||
end = "100%";
|
|
||||||
content = {
|
|
||||||
type = "swap";
|
|
||||||
randomEncryption = true;
|
|
||||||
resumeDevice = true; # resume from hiberation from this device
|
|
||||||
};
|
|
||||||
} # partition 3 (SWAP)
|
|
||||||
]; # partitions
|
]; # partitions
|
||||||
}; # content
|
}; # content
|
||||||
}; # disko.devices.disk.sda
|
}; # disko.devices.disk.sda
|
||||||
|
|
Loading…
Reference in a new issue