Update modules/server/containers/default.nix
This commit is contained in:
@@ -30,11 +30,14 @@ in{
|
|||||||
effectiveCfg = {
|
effectiveCfg = {
|
||||||
owner = "root:root";
|
owner = "root:root";
|
||||||
mode = "0400";
|
mode = "0400";
|
||||||
|
dirs = [];
|
||||||
} // cfg;
|
} // cfg;
|
||||||
in ''
|
in ''
|
||||||
${pkgs.coreutils}/bin/mkdir -p "${effectiveCfg.path}"
|
${pkgs.coreutils}/bin/mkdir -p "${effectiveCfg.path}"
|
||||||
|
${lib.concatMapStringsSep "\n" (dir: "${pkgs.coreutils}/bin/mkdir -p ${effectiveCfg.path}/${lib.escapeShellArg dir}") effectiveCfg.dirs}
|
||||||
${pkgs.coreutils}/bin/chown ${effectiveCfg.owner} "${effectiveCfg.path}"
|
${pkgs.coreutils}/bin/chown ${effectiveCfg.owner} "${effectiveCfg.path}"
|
||||||
${pkgs.coreutils}/bin/chmod ${effectiveCfg.mode} "${effectiveCfg.path}"
|
${pkgs.coreutils}/bin/chmod ${effectiveCfg.mode} "${effectiveCfg.path}"
|
||||||
|
|
||||||
'') allPathConfigs);
|
'') allPathConfigs);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user