fix mkdir
This commit is contained in:
@@ -29,10 +29,16 @@ in
|
|||||||
|
|
||||||
system.activationScripts.container-setup-dirs = {
|
system.activationScripts.container-setup-dirs = {
|
||||||
deps = [ "users" "groups" ];
|
deps = [ "users" "groups" ];
|
||||||
text = lib.concatStringsSep "\n" (map (cfg: ''
|
text = lib.concatStringsSep "\n" (map (cfg:
|
||||||
${pkgs.coreutils}/bin/mkdir -p "${cfg.path}"
|
let
|
||||||
${pkgs.coreutils}/bin/chown ${cfg.owner} "${cfg.path}"
|
effectiveCfg = {
|
||||||
${pkgs.coreutils}/bin/chmod ${cfg.mode} "${cfg.path}"
|
owner = "root:root";
|
||||||
|
mode = "0400";
|
||||||
|
} // cfg;
|
||||||
|
in ''
|
||||||
|
${pkgs.coreutils}/bin/mkdir -p "${effectiveCfg.path}"
|
||||||
|
${pkgs.coreutils}/bin/chown ${effectiveCfg.owner} "${effectiveCfg.path}"
|
||||||
|
${pkgs.coreutils}/bin/chmod ${effectiveCfg.mode} "${effectiveCfg.path}"
|
||||||
'') allPathConfigs);
|
'') allPathConfigs);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user