forked from DGNum/infrastructure
feat(dgn-hardware): Update ZFS settings
This commit is contained in:
parent
21c1848d96
commit
13b7b2fab4
1 changed files with 19 additions and 5 deletions
|
@ -6,7 +6,13 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkEnableOption mkIf mkMerge;
|
inherit (lib)
|
||||||
|
mkEnableOption
|
||||||
|
mkIf
|
||||||
|
mkMerge
|
||||||
|
mkOption
|
||||||
|
;
|
||||||
|
inherit (lib.types) listOf str;
|
||||||
|
|
||||||
cfg = config.dgn-hardware;
|
cfg = config.dgn-hardware;
|
||||||
in
|
in
|
||||||
|
@ -22,6 +28,17 @@ in
|
||||||
|
|
||||||
useZfs = mkEnableOption "zfs configuration.";
|
useZfs = mkEnableOption "zfs configuration.";
|
||||||
useBcachefs = mkEnableOption "bcachefs configuration";
|
useBcachefs = mkEnableOption "bcachefs configuration";
|
||||||
|
|
||||||
|
zfsPools = mkOption {
|
||||||
|
type = listOf str;
|
||||||
|
default = [
|
||||||
|
"fast01"
|
||||||
|
"work01"
|
||||||
|
];
|
||||||
|
description = ''
|
||||||
|
ZFS pools present on the machine
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable (
|
config = mkIf cfg.enable (
|
||||||
|
@ -69,10 +86,7 @@ in
|
||||||
|
|
||||||
zfs = {
|
zfs = {
|
||||||
forceImportRoot = false;
|
forceImportRoot = false;
|
||||||
extraPools = [
|
extraPools = cfg.zfsPools;
|
||||||
"fast01"
|
|
||||||
"work01"
|
|
||||||
];
|
|
||||||
package = pkgs.zfs_2_1;
|
package = pkgs.zfs_2_1;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue