nixos/lib: save triggers of systemd into nix store

This commit is contained in:
wrvsrx 2023-05-11 17:38:34 +08:00
parent cc41b47c6f
commit 05129aab01
No known key found for this signature in database
GPG Key ID: 8BCC6FC7D2BDCB3B

View File

@ -289,9 +289,9 @@ in rec {
// optionalAttrs (config.requisite != [])
{ Requisite = toString config.requisite; }
// optionalAttrs (config ? restartTriggers && config.restartTriggers != [])
{ X-Restart-Triggers = builtins.hashString "sha512" (toString config.restartTriggers); }
{ X-Restart-Triggers = "${pkgs.writeText "X-Restart-Triggers" (toString config.restartTriggers)}"; }
// optionalAttrs (config ? reloadTriggers && config.reloadTriggers != [])
{ X-Reload-Triggers = builtins.hashString "sha512" (toString config.reloadTriggers); }
{ X-Reload-Triggers = "${pkgs.writeText "X-Reload-Triggers" (toString config.reloadTriggers)}"; }
// optionalAttrs (config.description != "") {
Description = config.description; }
// optionalAttrs (config.documentation != []) {