diff --git a/config/nas.nix b/config/nas.nix index caf5c79f..0b91ae43 100644 --- a/config/nas.nix +++ b/config/nas.nix @@ -44,11 +44,26 @@ config.boot.kernelPackages.zenpower ]; - boot.supportedFilesystems = lib.mkForce ["bcachefs" "vfat"]; + boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; fileSystems."/" = { - device = "/dev/nvme0n1p2:/dev/sda1:/dev/sdb1:/dev/sdc1"; - fsType = "bcachefs"; + device = "tank/system/root"; + fsType = "zfs"; + }; + + fileSystems."/etc" = { + device = "tank/system/etc"; + fsType = "zfs"; + }; + + fileSystems."/nix" = { + device = "tank/system/nix"; + fsType = "zfs"; + }; + + fileSystems."/var" = { + device = "tank/data/var"; + fsType = "zfs"; }; fileSystems."/boot" = { @@ -56,6 +71,19 @@ fsType = "vfat"; }; + services.sanoid = { + enable = true; + datasets."tank/data" = { + yearly = 1; + recursive = true; + monthly = 12; + hourly = 24; + daily = 30; + autosnap = true; + autoprune = true; + }; + }; + environment.etc."sysconfig/lm_sensors".text = '' # Generated by sensors-detect on Sun Apr 24 08:31:51 2022 # This file is sourced by /etc/init.d/lm_sensors and defines the modules to