moved storage option draft to its own folder
This commit is contained in:
parent
aeb37e658e
commit
573708fd47
7 changed files with 160 additions and 140 deletions
3
modules/nixos-modules/storage/submodules/dataset.nix
Normal file
3
modules/nixos-modules/storage/submodules/dataset.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{name, ...}: {
|
||||
# TODO: we need to figure out what options a dataset can have in zfs
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
{lib, ...}: let
|
||||
pathPermissions = {
|
||||
read = lib.mkEnableOption "should the path have read permissions";
|
||||
write = lib.mkEnableOption "should the path have read permissions";
|
||||
execute = lib.mkEnableOption "should the path have read permissions";
|
||||
};
|
||||
pathTypeSubmodule = {name, ...}: {
|
||||
options = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
};
|
||||
owner = {
|
||||
user = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "nouser";
|
||||
};
|
||||
permissions = pathPermissions;
|
||||
};
|
||||
group = {
|
||||
group = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "nogroup";
|
||||
};
|
||||
permissions = pathPermissions;
|
||||
};
|
||||
other = {
|
||||
permissions = pathPermissions;
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
imports = [
|
||||
./dataset.nix
|
||||
];
|
||||
options = {
|
||||
files = lib.types.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.submodule pathTypeSubmodule);
|
||||
default = {};
|
||||
};
|
||||
directories = {
|
||||
type = lib.types.attrsOf (lib.types.submodule pathTypeSubmodule);
|
||||
default = {};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue