Compare commits
1 Commits
main
...
module/dbz
Author | SHA1 | Date |
---|---|---|
xenia | e98d1584df |
|
@ -2,6 +2,7 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
./modules/dragn-ball-zfs
|
||||
./modules/ghidra-server
|
||||
];
|
||||
|
||||
|
|
|
@ -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
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue