From 1158d9005f8fb1b265ed51fcc2a490b76b04f641 Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Sun, 18 May 2025 21:32:45 +0200 Subject: [PATCH] feat(loki): fix disk-config.nix --- hosts/loki/disk-config.nix | 97 ++++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 52 deletions(-) diff --git a/hosts/loki/disk-config.nix b/hosts/loki/disk-config.nix index e0e60c6..ff82562 100644 --- a/hosts/loki/disk-config.nix +++ b/hosts/loki/disk-config.nix @@ -1,57 +1,50 @@ -{ +{lib, ...}: { disko.devices = { - disk = { - main = { - type = "disk"; - device = "/dev/nvme0n1"; - content = { - type = "gpt"; - partitions = { - ESP = { - size = "512M"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = ["umask=0077"]; - }; + disk.disk1 = { + device = lib.mkDefault "/dev/vda"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + boot = { + name = "boot"; + size = "1M"; + type = "EF02"; + }; + esp = { + name = "ESP"; + size = "500M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; }; - luks = { - size = "100%"; - content = { - type = "luks"; - name = "crypted"; - settings.allowDiscards = true; - passwordFile = "/tmp/secret.key"; - content = { - type = "btrfs"; - extraArgs = ["-f"]; - subvolumes = { - "@" = { - mountpoint = "/"; - mountOptions = [ - "compress=zstd" - "noatime" - ]; - }; - "@home" = { - mountpoint = "/home"; - mountOptions = [ - "compress=zstd" - "noatime" - ]; - }; - "@nix" = { - mountpoint = "/nix"; - mountOptions = [ - "compress=zstd" - "noatime" - ]; - }; - }; - }; - }; + }; + root = { + name = "root"; + size = "100%"; + content = { + type = "lvm_pv"; + vg = "pool"; + }; + }; + }; + }; + }; + lvm_vg = { + pool = { + type = "lvm_vg"; + lvs = { + root = { + size = "100%FREE"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + mountOptions = [ + "defaults" + ]; }; }; };