diff --git a/hosts/min/configuration.nix b/hosts/min/configuration.nix index 2f7ac39..caa663e 100644 --- a/hosts/min/configuration.nix +++ b/hosts/min/configuration.nix @@ -5,7 +5,7 @@ }: { imports = [ - ../nuos/disk-config.nix + ../muos/disk-config.nix ../../common/boot.nix ]; diff --git a/hosts/muos/disk-config.nix b/hosts/muos/disk-config.nix index aefa76f..056c78f 100644 --- a/hosts/muos/disk-config.nix +++ b/hosts/muos/disk-config.nix @@ -1,27 +1,48 @@ +# Example to create a bios compatible gpt partition +{ lib, ... }: { disko.devices = { - disk = { - main = { - device = "/dev/disk/by-id/nvme-Samsung_SSD_980_PRO_1TB_S5GXNX0RB19202X"; - type = "disk"; - content = { - type = "gpt"; - partitions = { - ESP = { - type = "EF00"; - size = "1000M"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; + disk.main = { + device = lib.mkDefault "/dev/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 = "filesystem"; - format = "ext4"; - mountpoint = "/"; + }; + root = { + size = "100%"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "/rootfs" = { + mountpoint = "/"; + }; + + "/home" = { + mountOptions = [ "compress=zstd" ]; + mountpoint = "/home"; + }; + + "/nix" = { + mountOptions = [ + "compress=zstd" + "noatime" + ]; + mountpoint = "/nix"; + }; }; }; };