summaryrefslogtreecommitdiffstats
path: root/krebs/3modules
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2019-04-18 01:23:55 +0200
committertv <tv@krebsco.de>2019-04-18 01:23:55 +0200
commitbc200e51552207a6d32caca8e57d6d39b06fe3c9 (patch)
treeb9736b999e77e97d3e4820d67aa41f6cf753bf1e /krebs/3modules
parent520c9ef692d07672aa61c9e69bf34065f5abfbe1 (diff)
krebs.permown: mkdirs on activation
Diffstat (limited to 'krebs/3modules')
-rw-r--r--krebs/3modules/permown.nix6
1 files changed, 6 insertions, 0 deletions
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 <stockholm/lib>;
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 = {