From 876904978f878b985a9ff6165a2b052f091a4ea4 Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Mon, 22 Dec 2025 14:44:49 +0100 Subject: [PATCH] add diskconfig for pc --- hosts/lambdaos/disk-config.nix | 71 ++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 hosts/lambdaos/disk-config.nix diff --git a/hosts/lambdaos/disk-config.nix b/hosts/lambdaos/disk-config.nix new file mode 100644 index 0000000..ddd9e70 --- /dev/null +++ b/hosts/lambdaos/disk-config.nix @@ -0,0 +1,71 @@ +{ lib, ... }: +{ + disko.devices = { + disk = { + root = { + device = lib.mkDefault "/dev/disk/nvme0n1"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + esp = { + priority = 1; + name = "ESP"; + start = "1M"; + end = "1024M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + + root = { + size = "100%"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "/rootfs" = { + mountpoint = "/"; + }; + + "/nix" = { + mountOptions = [ + "compress=zstd" + "noatime" + ]; + mountpoint = "/nix"; + }; + }; + }; + }; + }; + }; + }; + home = { + device = lib.mkDefault "/dev/disk/nvme1n1"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + home = { + size = "100%"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "/home" = { + mountpoint = "/home"; + }; + }; + }; + }; + }; + }; + }; + }; + }; +}