From caa326d496adc21e7457a9b8a7489889ce1b7336 Mon Sep 17 00:00:00 2001 From: mjallen18 Date: Tue, 29 Jul 2025 18:26:50 -0500 Subject: [PATCH] test --- modules/nixos/disko/aarch64-linux/default.nix | 106 +++++++++--------- 1 file changed, 55 insertions(+), 51 deletions(-) diff --git a/modules/nixos/disko/aarch64-linux/default.nix b/modules/nixos/disko/aarch64-linux/default.nix index 9c66f36..d65b179 100644 --- a/modules/nixos/disko/aarch64-linux/default.nix +++ b/modules/nixos/disko/aarch64-linux/default.nix @@ -1,5 +1,4 @@ { - config, lib, system, ... @@ -46,8 +45,6 @@ in ESP = { priority = 2; name = "ESP"; - # start = "1G"; - # end = "2G"; size = "1G"; type = "EF00"; content = { @@ -57,61 +54,68 @@ in mountOptions = [ "umask=0077" ]; }; }; - root = { - name = "btrfs-root"; + name = "bcachefs-root"; size = "100%"; content = { - type = "btrfs"; - extraArgs = [ "-f" ]; # Override existing partition - # Subvolumes must set a mountpoint in order to be mounted, - # unless their parent is mounted - subvolumes = { - "home" = { - mountOptions = [ "compress=zstd" ]; - mountpoint = "/home"; - }; - "root" = { - mountOptions = [ - "compress=zstd" - "noatime" - ]; - mountpoint = "/root"; - }; - "nix" = { - mountOptions = [ - "compress=zstd" - "noatime" - ]; - mountpoint = "/nix"; - }; - "etc" = { - mountOptions = [ - "compress=zstd" - "noatime" - ]; - mountpoint = "/etc"; - }; - "tmp" = { - mountOptions = [ - "compress=zstd" - "noatime" - ]; - mountpoint = "/tmp"; - }; - "log" = { - mountOptions = [ - "compress=zstd" - "noatime" - ]; - mountpoint = "/var/log"; - }; - }; + type = "bcachefs"; + filesystem = "main_fs"; # Reference to filesystem below + extraFormatArgs = [ "--discard" ]; }; }; }; }; }; + bcachefs_filesystems = { + main_fs = { + type = "bcachefs_filesystem"; + extraFormatArgs = [ + "--compression=zstd" + "--background_compression=zstd" + ]; + subvolumes = { + # Root subvolume + "subvolumes/root" = { + mountpoint = "/root"; + mountOptions = [ + "noatime" + ]; + }; + # Home subvolume + "subvolumes/home" = { + mountpoint = "/home"; + }; + # Nix store + "subvolumes/nix" = { + mountpoint = "/nix"; + mountOptions = [ + "noatime" + ]; + }; + # Etc + "subvolumes/etc" = { + mountpoint = "/etc"; + mountOptions = [ + "noatime" + ]; + }; + # Tmp + "subvolumes/tmp" = { + mountpoint = "/tmp"; + mountOptions = [ + "noatime" + ]; + }; + # Log + "subvolumes/log" = { + mountpoint = "/var/log"; + mountOptions = [ + "noatime" + ]; + }; + }; + }; + }; }; }; -} +} \ No newline at end of file