fix: actually run the extra scripts

This commit is contained in:
silver 2023-09-17 20:10:06 +01:00
parent 1300b7f6ec
commit 69cb8e9a3f

View file

@ -58,6 +58,8 @@
DATABASE = "database.db"; DATABASE = "database.db";
}; };
service_name = script: lib.strings.sanitizeDerivationName("${cfg.user}@${script}");
# oneshot scripts to run # oneshot scripts to run
serviceGenerator = mapAttrs' (script: time: nameValuePair (service_name script) { serviceGenerator = mapAttrs' (script: time: nameValuePair (service_name script) {
description = "Service for ${desc} ${script}"; description = "Service for ${desc} ${script}";
@ -206,7 +208,11 @@
]; ];
}; };
}; };
}; } // serviceGenerator scripts;
# timers to run the above services
systemd.timers = timerGenerator scripts;
}; };
}; };
} }