From be1e7b8e9db6bf89c6a988814df12483eba8d1f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Krop=C3=A1=C4=8Dek?= Date: Mon, 10 Mar 2025 22:27:20 +0100 Subject: [PATCH] lets hope this works --- hosts/lenar/disko.nix | 55 +++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/hosts/lenar/disko.nix b/hosts/lenar/disko.nix index 258a7c6..c5c0698 100644 --- a/hosts/lenar/disko.nix +++ b/hosts/lenar/disko.nix @@ -8,10 +8,8 @@ type = "gpt"; partitions = { ESP = { - priority = 1; name = "ESP"; - start = "1M"; - end = "1G"; + size = "1G"; type = "EF00"; content = { type = "filesystem"; @@ -19,30 +17,37 @@ mountpoint = "/boot"; }; }; - root = { + luks = { size = "100%"; content = { - type = "btrfs"; - extraArgs = [ "-f" ]; # Override existing partition - # Subvolumes must set a mountpoint in order to be mounted, - # unless their parent is mounted - subvolumes = { - # Subvolume name is different from mountpoint - "/rootfs" = { - mountpoint = "/"; - }; - # Subvolume name is the same as the mountpoint - "/home" = { - mountOptions = [ "compress=zstd" ]; - mountpoint = "/home"; - }; - # Parent is not mounted so the mountpoint must be set - "/nix" = { - mountOptions = [ - "compress=zstd" - "noatime" - ]; - mountpoint = "/nix"; + type = "luks"; + name = "crypted"; + passwordFile = "/tmp/password.tmp"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "/rootfs" = { + mountOptions = [ + "compress=zstd" + "noatime" + ]; + mountpoint = "/"; + }; + "/home" = { + mountOptions = [ + "compress=zstd" + "noatime" + ]; + mountpoint = "/home"; + }; + "/nix" = { + mountOptions = [ + "compress=zstd" + "noatime" + ]; + mountpoint = "/nix"; + }; }; }; };