From 185f08af8250ccd8ba97966cd16c6b09cb6b4d35 Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Wed, 3 Jan 2024 01:58:12 +0800 Subject: [PATCH] nixos: disko: cleanup --- nixos/profiles/common/opt-in/disko.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/nixos/profiles/common/opt-in/disko.nix b/nixos/profiles/common/opt-in/disko.nix index 69e77a4..d26f420 100644 --- a/nixos/profiles/common/opt-in/disko.nix +++ b/nixos/profiles/common/opt-in/disko.nix @@ -7,7 +7,7 @@ content = { type = "gpt"; partitions = { - "ESP" = { + "esp" = { size = "2G"; type = "EF00"; content = { @@ -26,20 +26,17 @@ content = { type = "luks"; name = "crypted"; - extraOpenArgs = ["--allow-discards"]; - passwordFile = "/tmp/secret.key"; # Interactive + settings.allowDiscards = true; content = { type = "btrfs"; - extraArgs = ["-f"]; - mountpoint = "/btrfs"; subvolumes = { "/@nix" = { mountpoint = "/nix"; - mountOptions = ["compress=zstd" "noatime"]; + mountOptions = ["defaults" "compress=zstd" "noatime"]; }; "/@persist" = { mountpoint = "/persist"; - mountOptions = ["compress=zstd" "noatime"]; + mountOptions = ["defaults" "compress=zstd" "noatime"]; }; }; }; @@ -50,7 +47,7 @@ content = { type = "swap"; randomEncryption = true; - resumeDevice = true; # resume from hiberation from this device + #resumeDevice = true; # resume from hiberation from this device }; }; }; @@ -61,9 +58,11 @@ "/" = { fsType = "tmpfs"; mountOptions = [ - "size=2G" "defaults" + "size=2G" "mode=755" + "nodev" + "nosuid" ]; }; };