From 13b7b2fab4de278f7e3e067df18981a9e46ef7c3 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Wed, 21 Feb 2024 17:17:40 +0100 Subject: [PATCH] feat(dgn-hardware): Update ZFS settings --- modules/dgn-hardware.nix | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/modules/dgn-hardware.nix b/modules/dgn-hardware.nix index 54cf458..c4e013e 100644 --- a/modules/dgn-hardware.nix +++ b/modules/dgn-hardware.nix @@ -6,7 +6,13 @@ }: let - inherit (lib) mkEnableOption mkIf mkMerge; + inherit (lib) + mkEnableOption + mkIf + mkMerge + mkOption + ; + inherit (lib.types) listOf str; cfg = config.dgn-hardware; in @@ -22,6 +28,17 @@ in useZfs = mkEnableOption "zfs configuration."; useBcachefs = mkEnableOption "bcachefs configuration"; + + zfsPools = mkOption { + type = listOf str; + default = [ + "fast01" + "work01" + ]; + description = '' + ZFS pools present on the machine + ''; + }; }; config = mkIf cfg.enable ( @@ -69,10 +86,7 @@ in zfs = { forceImportRoot = false; - extraPools = [ - "fast01" - "work01" - ]; + extraPools = cfg.zfsPools; package = pkgs.zfs_2_1; }; };