From 71e9abc994f5089c00a2764a75fad2a043772cb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Sat, 5 Oct 2024 16:41:51 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20(aurum)=20rework=20disko=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hosts/aurum/system/disko.nix | 63 +++++++++++++++++------------------- 1 file changed, 30 insertions(+), 33 deletions(-) diff --git a/hosts/aurum/system/disko.nix b/hosts/aurum/system/disko.nix index b5336c6..12be3ba 100644 --- a/hosts/aurum/system/disko.nix +++ b/hosts/aurum/system/disko.nix @@ -1,21 +1,23 @@ {...}: { disko.devices = { disk = { - nvme0 = { + main = { type = "disk"; device = "/dev/nvme0n1"; content = { type = "gpt"; partitions = { esp = { - size = "512M"; + priority = 1; type = "EF00"; + size = "1024M"; content = { type = "filesystem"; format = "vfat"; mountpoint = "/boot"; mountOptions = [ "defaults" + "umask=0077" ]; }; }; @@ -24,44 +26,39 @@ content = { type = "luks"; name = "crypted"; - settings.allowDiscards = true; - passwordFile = "/tmp/secret.key"; + settings = { + allowDiscards = true; + }; content = { - type = "lvm_pv"; - vg = "pool"; + type = "btrfs"; + extraArgs = ["-f"]; + subvolumes = { + "/nix" = { + mountOptions = [ + "compress=zstd" + "noatime" + ]; + mountpoint = "/nix"; + }; + "/persist" = { + mountOptions = ["compress=zstd"]; + mountpoint = "/persist"; + }; + }; }; }; }; }; }; }; - }; - lvm_vg = { - pool = { - type = "lvm_vg"; - lvs = { - root = { - size = "100M"; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - mountOptions = [ - "defaults" - ]; - }; - }; - home = { - size = "10M"; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/home"; - }; - }; - raw = { - size = "10M"; - }; + nodev = { + "/" = { + fsType = "tmpfs"; + mountOptions = [ + "defaults" + "mode=755" + "size=8G" + ]; }; }; };