From 3e42203ed7873466156ef36f323a7373150a0ce1 Mon Sep 17 00:00:00 2001 From: iFargle Date: Thu, 5 Oct 2023 18:07:17 +0900 Subject: [PATCH] Test --- nixos/hosts/osaka-vultr-01/disks.nix | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/nixos/hosts/osaka-vultr-01/disks.nix b/nixos/hosts/osaka-vultr-01/disks.nix index 67ad5899..d3c59eb3 100644 --- a/nixos/hosts/osaka-vultr-01/disks.nix +++ b/nixos/hosts/osaka-vultr-01/disks.nix @@ -4,6 +4,9 @@ device = "/dev/vda"; enableCryptodisk = true; }; + boot.initrd.luks.devices."DISK".device = "/dev/vda2"; + services.btrfs.autoScrub.enable = true; + services.btrfs.autoScrub.interval = "weekly"; disko.devices.disk.vda = { device = "/dev/vda"; @@ -22,12 +25,25 @@ name = "crypted"; extraOpenArgs = [ "--allow-discards" ]; content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - }; - }; - }; + type = "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 + }; # luks.partitions }; # partitions }; # content }; # disko.devices.disk.vda