22 lines
400 B
Nix
22 lines
400 B
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
with lib;
|
|
let activeProfiles = config.profiles;
|
|
in {
|
|
config = mkIf (elem "zfs" activeProfiles) {
|
|
boot.supportedFilesystems = [ "zfs" ];
|
|
|
|
services.zfs = {
|
|
trim.enable = true;
|
|
autoSnapshot = {
|
|
enable = true;
|
|
flags = "-k -p --utc";
|
|
};
|
|
autoScrub = {
|
|
enable = true;
|
|
interval = "weekly";
|
|
};
|
|
};
|
|
};
|
|
}
|