149 current 2025-10-09 03:59:16 25.05.20251006.20c4598 6.12.50 *
This commit is contained in:
35
modules/homelab/shares/zfs.nix
Normal file
35
modules/homelab/shares/zfs.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.modules.homelab.zfs;
|
||||
in
|
||||
{
|
||||
options.modules.homelab.zfs = {
|
||||
enable = lib.mkEnableOption "enables zfs";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# set network host id
|
||||
networking.hostId = "3e6e7055";
|
||||
|
||||
# enable zfs support
|
||||
boot.kernelModules = [ "zfs" ];
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
|
||||
# enable smart monitoring
|
||||
services.smartd.enable = true;
|
||||
|
||||
# enable zfs
|
||||
services.zfs = {
|
||||
autoScrub.enable = true;
|
||||
autoScrub.interval = "weekly";
|
||||
};
|
||||
|
||||
fileSystems."/holocron" = {
|
||||
device = "holocron";
|
||||
fsType = "zfs";
|
||||
options = [ "nofail" ];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user