fix mkdir

This commit is contained in:
soraefir
2026-05-11 22:05:38 +02:00
parent b3eb1de9e6
commit 036f1117be

View File

@@ -29,10 +29,16 @@ in
system.activationScripts.container-setup-dirs = {
deps = [ "users" "groups" ];
text = lib.concatStringsSep "\n" (map (cfg: ''
${pkgs.coreutils}/bin/mkdir -p "${cfg.path}"
${pkgs.coreutils}/bin/chown ${cfg.owner} "${cfg.path}"
${pkgs.coreutils}/bin/chmod ${cfg.mode} "${cfg.path}"
text = lib.concatStringsSep "\n" (map (cfg:
let
effectiveCfg = {
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);
};