diff options
Diffstat (limited to 'hosts/thinkpad/disko.nix')
| -rw-r--r-- | hosts/thinkpad/disko.nix | 81 |
1 files changed, 53 insertions, 28 deletions
diff --git a/hosts/thinkpad/disko.nix b/hosts/thinkpad/disko.nix index 120efbc..f3243d8 100644 --- a/hosts/thinkpad/disko.nix +++ b/hosts/thinkpad/disko.nix @@ -8,7 +8,7 @@ type = "gpt"; partitions = { ESP = { - size = "1G"; + size = "2G"; type = "EF00"; content = { type = "filesystem"; @@ -17,35 +17,60 @@ mountOptions = [ "umask=0077" ]; }; }; - root = { + luks = { size = "100%"; content = { - type = "btrfs"; - extraArgs = [ "-f" ]; - subvolumes = { - "@" = { - mountpoint = "/"; - mountOptions = [ "compress=zstd:1" "noatime" ]; - }; - "@home" = { - mountpoint = "/home"; - mountOptions = [ "compress=zstd:1" "noatime" ]; - }; - "@nix" = { - mountpoint = "/nix"; - mountOptions = [ "compress=zstd:1" "noatime" ]; - }; - "@log" = { - mountpoint = "/var/log"; - mountOptions = [ "compress=zstd:1" "noatime" ]; - }; - "@vms" = { - mountpoint = "/vms"; - mountOptions = [ "nodatacow" "noatime" ]; - }; - "@swap" = { - mountpoint = "/.swapvol"; - mountOptions = [ "nodatacow" "noatime" ]; + type = "luks"; + name = "crypted"; + settings = { + allowDiscards = true; + }; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "@" = { + mountpoint = "/"; + mountOptions = [ + "compress=zstd:1" + "noatime" + ]; + }; + "@home" = { + mountpoint = "/home"; + mountOptions = [ + "compress=zstd:1" + "noatime" + ]; + }; + "@nix" = { + mountpoint = "/nix"; + mountOptions = [ + "compress=zstd:1" + "noatime" + ]; + }; + "@log" = { + mountpoint = "/var/log"; + mountOptions = [ + "compress=zstd:1" + "noatime" + ]; + }; + "@vms" = { + mountpoint = "/vms"; + mountOptions = [ + "nodatacow" + "noatime" + ]; + }; + "@swap" = { + mountpoint = "/.swapvol"; + mountOptions = [ + "nodatacow" + "noatime" + ]; + }; }; }; }; |
