refactor: moved modules to legacy-modules
This commit is contained in:
parent
d646b954ac
commit
db7ac35613
233 changed files with 5 additions and 5 deletions
|
|
@ -0,0 +1,56 @@
|
|||
args @ {lib, ...}: {name, ...}: let
|
||||
datasetSubmodule = (import ./dataset.nix) args;
|
||||
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 = {
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "root";
|
||||
};
|
||||
permissions = pathPermissions;
|
||||
};
|
||||
group = {
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "root";
|
||||
};
|
||||
permissions = pathPermissions;
|
||||
};
|
||||
other = {
|
||||
permissions = pathPermissions;
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
imports = [
|
||||
datasetSubmodule
|
||||
];
|
||||
|
||||
options = {
|
||||
files = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.submodule pathTypeSubmodule);
|
||||
default = {};
|
||||
};
|
||||
directories = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.submodule pathTypeSubmodule);
|
||||
default = {};
|
||||
};
|
||||
impermanence.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
mount = lib.mkDefault "/${name}";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue