diff --git a/partitions/luks-btrfs-subvolumes.nix b/partitions/luks-btrfs-subvolumes.nix index 6fa5122..01661c0 100644 --- a/partitions/luks-btrfs-subvolumes.nix +++ b/partitions/luks-btrfs-subvolumes.nix @@ -8,7 +8,7 @@ type = "gpt"; partitions = { ESP = { - size = "1024M"; + size = "1G"; type = "EF00"; content = { type = "filesystem"; diff --git a/partitions/simple-efi-swap.nix b/partitions/simple-efi-swap.nix new file mode 100644 index 0000000..fbeb2f8 --- /dev/null +++ b/partitions/simple-efi-swap.nix @@ -0,0 +1,49 @@ +{ + disko.devices = { + disk = { + main = { + device = "/dev/vdb"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "1G"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + root = { + end = "-8G"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + encryptedSwap = { + size = "100M"; + content = { + type = "swap"; + randomEncryption = true; + priority = 100; # prefer to encrypt as long as we have space for it + }; + }; + plainSwap = { + size = "100%"; + content = { + type = "swap"; + discardPolicy = "both"; + resumeDevice = true; # resume from hiberation from this device + }; + }; + }; + }; + }; + }; + }; +}