Compare commits

...

1 Commits

Author SHA1 Message Date
xenia e98d1584df wip: create dbzfs module 2024-04-10 23:48:00 -04:00
2 changed files with 37 additions and 0 deletions

View File

@ -2,6 +2,7 @@
{ {
imports = [ imports = [
./modules/dragn-ball-zfs
./modules/ghidra-server ./modules/ghidra-server
]; ];

View File

@ -0,0 +1,36 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.dbzfs;
in {
options.dbzfs = {
enable = mkEnableOption "dbzfs" // {
default = true;
};
package = mkPackageOption pkgs "zfs" {};
managedRoot = mkOption {
default = null;
example = literalExpression "\"rpool/data\"";
description = mdDoc "Root dataset which is managed by dbzfs.";
type = types.str;
};
datasets = mkOption {
default = [];
example = literalExpression "TODO";
description = mdDoc "List of datasets to set up with dbzfs";
type = types.listOf types.anything; # todo
};
};
config = mkIf cfg.enable {
assertions = [{
assertion = cfg.managedRoot != null;
message = "dbzfs is enabled but dbzfs.managedRoot is not defined!";
}];
system.activationScripts.dbzfs = ''
echo meow
'';
};
}