diff --git a/nixos/hosts/nixos-vm-02/disks.nix b/nixos/hosts/nixos-vm-02/disks.nix index 4fff6b70..b1c9c102 100644 --- a/nixos/hosts/nixos-vm-02/disks.nix +++ b/nixos/hosts/nixos-vm-02/disks.nix @@ -1,6 +1,8 @@ { boot.loader.grub.device = "/dev/sda"; boot.initrd.luks.devices."sda2".device = "/dev/sda2"; + services.btrfs.autoScrub.enable = true; + services.btrfs.autoScrub.interval = "weekly"; disko.devices.disk.sda = { device = "/dev/sda"; @@ -32,8 +34,22 @@ settings.keyFile = "/tmp/secret.key"; content = { type = "filesystem"; - format = "ext4"; - mountpoint = "/"; + format = "btrfs"; + # extraArgs = [ "-f" ]; + subvolumes = { + "/root" = { + mountpoint = "/"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; # root + "/home" = { + mountpoint = "/home"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; # home + "/nix" = { + mountpoint = "/nix"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; # nix + }; # subvolumes }; # content.content }; # content } # partition 2