made impermanence config work slightly better
This commit is contained in:
parent
2d5e37b1eb
commit
48dc0b1150
8 changed files with 66 additions and 25 deletions
|
@ -21,7 +21,7 @@ in {
|
|||
type = lib.types.listOf (lib.types.submodule ({config, ...}: {
|
||||
options = {
|
||||
folder = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
type = lib.types.str;
|
||||
description = "what is the name of this export directory";
|
||||
};
|
||||
bind = lib.mkOption {
|
||||
|
@ -30,12 +30,12 @@ in {
|
|||
default = null;
|
||||
};
|
||||
user = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
type = lib.types.str;
|
||||
description = "what user owns this directory";
|
||||
default = "nouser";
|
||||
};
|
||||
group = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
type = lib.types.str;
|
||||
description = "what group owns this directory";
|
||||
default = "nogroup";
|
||||
};
|
||||
|
@ -57,11 +57,11 @@ in {
|
|||
# create any folders that we need to have for our exports
|
||||
systemd.tmpfiles.rules =
|
||||
[
|
||||
"d ${config.host.network_storage.export_directory} 2775 root root -"
|
||||
"d ${config.host.network_storage.export_directory} 2770 root root -"
|
||||
]
|
||||
++ (
|
||||
builtins.map (
|
||||
directory: "d ${directory._directory} 2775 ${directory.user} ${directory.group}"
|
||||
directory: "d ${directory._directory} 2770 ${directory.user} ${directory.group}"
|
||||
)
|
||||
config.host.network_storage.directories
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue