more rearchitecting folders

This commit is contained in:
Noah Masur
2025-02-14 15:36:54 -05:00
parent c7f20e958b
commit 798bac75e8
37 changed files with 164 additions and 42 deletions

View File

@ -0,0 +1,27 @@
{
config,
pkgs,
lib,
...
}:
let
cfg = config.nmasur.presets.zfs;
in
{
options.nmasur.presets.zfs.enable = lib.mkEnableOption "ZFS file system";
config = lib.mkIf cfg.enable {
# Only use compatible Linux kernel, since ZFS can be behind
boot.kernelPackages = pkgs.linuxPackages; # Defaults to latest LTS
boot.kernelParams = [ "nohibernate" ]; # ZFS does not work with hibernation
boot.supportedFilesystems = [ "zfs" ];
services.prometheus.exporters.zfs.enable = config.prometheus.exporters.enable;
prometheus.scrapeTargets = [
"127.0.0.1:${builtins.toString config.services.prometheus.exporters.zfs.port}"
];
};
}