From f3d04f5a91495c87bee56bc033a65a2129c31ddb Mon Sep 17 00:00:00 2001 From: iFargle Date: Fri, 22 Sep 2023 17:44:23 +0900 Subject: [PATCH] test --- nixos/hosts/nixos-vm-02/disks.nix | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) 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