From 4688ce4145102ef2793faa874138c9edbe8a6ec1 Mon Sep 17 00:00:00 2001 From: iFargle Date: Sat, 23 Sep 2023 22:05:27 +0900 Subject: [PATCH] update disko --- docs/setup.sh | 10 +++++++++- nixos/hosts/nixos-vm-02/disks.nix | 12 +----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/docs/setup.sh b/docs/setup.sh index 2820a5c4..f21fedbe 100755 --- a/docs/setup.sh +++ b/docs/setup.sh @@ -14,15 +14,23 @@ sudo mkdir /tmp/drive sudo cryptsetup luksOpen /dev/${drive}3 usb-luks sudo mount /dev/mapper/usb-luks /tmp/drive gpg --import /tmp/drive/gpg/albert@sysctl.io/privkey.asc +sudo umount /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 sleep 10 # Setup SOPS +echo "!!!!!" +echo "!!!!!" +echo "!!!!!" echo "!!!!! Copy this key to .sops.yaml: " +echo "!!!!!" +echo "!!!!!" +echo "!!!!!" sudo ssh-to-pgp \ - -comment "Generated `ddate`" \ + -comment "Generated `date +%Y.%m.%d`" \ -email "root@`hostname`" \ -i /etc/ssh/ssh_host_rsa_key \ -o /etc/nixos/git/keys/hosts/$(hostname).asc diff --git a/nixos/hosts/nixos-vm-02/disks.nix b/nixos/hosts/nixos-vm-02/disks.nix index e23d3085..d65928aa 100644 --- a/nixos/hosts/nixos-vm-02/disks.nix +++ b/nixos/hosts/nixos-vm-02/disks.nix @@ -26,7 +26,7 @@ { name = "LUKS"; start = "550MiB"; - end = "-64GiB"; + end = "100%"; content = { type = "luks"; name = "ROOT"; @@ -51,16 +51,6 @@ }; # content.content }; # content } # 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 }; # content }; # disko.devices.disk.sda