From fd69ebbaad366cca94f13489723ce003bea69c36 Mon Sep 17 00:00:00 2001 From: Mathias Magnusson Date: Fri, 10 Oct 2025 18:42:56 +0200 Subject: Initial commit --- disko.nix | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 disko.nix (limited to 'disko.nix') diff --git a/disko.nix b/disko.nix new file mode 100644 index 0000000..1f89ffa --- /dev/null +++ b/disko.nix @@ -0,0 +1,49 @@ +{ + disko.devices.disk.main = { + type = "disk"; + device = "/dev/nvme0n1"; + content = { + type = "gpt"; + partitions.ESP = { + priority = 1; + name = "ESP"; + start = "1M"; + end = "512M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + partitions.root = { + size = "100%"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "/root" = { + mountpoint = "/"; + mountOptions = [ "subvol=root" "compress=zstd" "noatime" ]; + }; + "/home" = { + mountpoint = "/home"; + mountOptions = [ "subvol=home" "compress=zstd" "noatime" ]; + }; + "/nix" = { + mountpoint = "/nix"; + mountOptions = [ "subvol=nix" "compress=zstd" "noatime" ]; + }; + "/nix/persist" = { + mountpoint = "/nix/persist"; + mountOptions = [ "subvol=persist" "compress=zstd" "noatime" ]; + }; + }; + }; + }; + }; + }; + + fileSystems."/nix/persist".neededForBoot = true; +} -- cgit v1.2.3