restructured & first test of toggleable config

This commit is contained in:
2025-10-04 11:26:25 -05:00
parent 7bff22ec39
commit 142dd3b568
9 changed files with 49 additions and 99 deletions

View File

@@ -1,22 +1,28 @@
{ config, pkgs, ... }:
{ config, lib, pkgs, ... }:
{
# set network host id
networking.hostId = "3e6e7055";
options = {
homelab.zfs.enable = lib.mkEnableOption "enables zfs";
};
# enable zfs support
boot.kernelModules = [ "zfs" ];
boot.supportedFilesystems = [ "zfs" ];
config = lib.mkIf config.homelab.zfs.enable {
# set network host id
networking.hostId = "3e6e7055";
# enable smart monitoring
services.smartd.enable = true;
# enable zfs support
boot.kernelModules = [ "zfs" ];
boot.supportedFilesystems = [ "zfs" ];
# enable zfs
services.zfs = {
autoScrub.enable = true;
autoScrub.interval = "weekly";
# enable smart monitoring
services.smartd.enable = true;
# enable zfs
services.zfs = {
autoScrub.enable = true;
autoScrub.interval = "weekly";
};
};
}