From bc200e51552207a6d32caca8e57d6d39b06fe3c9 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 18 Apr 2019 01:23:55 +0200 Subject: krebs.permown: mkdirs on activation --- krebs/3modules/permown.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'krebs') diff --git a/krebs/3modules/permown.nix b/krebs/3modules/permown.nix index 1e6471ede..f190bf86a 100644 --- a/krebs/3modules/permown.nix +++ b/krebs/3modules/permown.nix @@ -37,6 +37,12 @@ with import ; plans = attrValues config.krebs.permown; in mkIf (plans != []) { + system.activationScripts.permown = let + mkdir = plan: /* sh */ '' + ${pkgs.coreutils}/bin/mkdir -p ${shell.escape plan.path} + ''; + in concatMapStrings mkdir plans; + systemd.services = genAttrs' plans (plan: { name = "permown.${replaceStrings ["/"] ["_"] plan.path}"; value = { -- cgit v1.2.3