From 9f39bbdd04704c44c8cda4bebf183286236378f2 Mon Sep 17 00:00:00 2001 From: Mohamed Chrayed Date: Wed, 4 Mar 2026 17:54:09 +0100 Subject: [PATCH] disko --- modules/disks/sys/singledisk.nix | 46 +++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/modules/disks/sys/singledisk.nix b/modules/disks/sys/singledisk.nix index 35df87d..545876d 100644 --- a/modules/disks/sys/singledisk.nix +++ b/modules/disks/sys/singledisk.nix @@ -1,14 +1,42 @@ { ... }: { flake.nixosModules.disks-sys-singledisk = { - fileSystems."/" = { - device = "/dev/disk/by-label/root"; - fsType = "xfs"; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-label/boot"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; + 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 = [ "fmask=0077" "dmask=0077" ]; + extraArgs = [ "-n" "boot" ]; + }; + }; + luks = { + size = "100%"; + content = { + type = "luks"; + name = "cryptroot"; + settings.allowDiscards = true; + content = { + type = "filesystem"; + format = "xfs"; + mountpoint = "/"; + extraArgs = [ "-L" "root" ]; + }; + }; + }; + }; + }; + }; + }; }; swapDevices = [{