conditional activation

This commit is contained in:
shimun 2020-12-23 14:18:28 +01:00
parent 7e2a3961a8
commit 3cc5617307
Signed by: shimun
GPG Key ID: E81D8382DC2F971B

View File

@ -66,7 +66,7 @@ in
};
config = {
users.users = mkIf cfg.enable { ${cfg.user} = { }; };
system.activationScripts.brownpaper = {
system.activationScripts.brownpaper = mkIf cfg.enable {
text = ''
mkdir -p ${toString cfg.dataDir}
chown ${toString cfg.user} -R ${toString cfg.dataDir}