Compare commits
1 Commits
1403c9d3bc
...
final-befo
| Author | SHA1 | Date | |
|---|---|---|---|
| 4bc5d57fa6 |
@@ -13,7 +13,13 @@ in
|
|||||||
lib.mkIf config.services.jellyfin.enable {
|
lib.mkIf config.services.jellyfin.enable {
|
||||||
# Materialise the Jellyfin Webhook plugin into Jellyfin's plugins dir before
|
# Materialise the Jellyfin Webhook plugin into Jellyfin's plugins dir before
|
||||||
# Jellyfin starts. Jellyfin rewrites meta.json at runtime, so a read-only
|
# Jellyfin starts. Jellyfin rewrites meta.json at runtime, so a read-only
|
||||||
# nix-store symlink would EACCES — we copy instead.
|
# nix-store symlink would EACCES -- we copy instead.
|
||||||
|
#
|
||||||
|
# `wantedBy = [ "jellyfin.service" ]` alone is insufficient on initial rollout:
|
||||||
|
# if jellyfin is already running at activation time, systemd won't start the
|
||||||
|
# oneshot until the next jellyfin restart. `restartTriggers` on jellyfin pinned
|
||||||
|
# to the plugin package + install script forces that restart whenever either
|
||||||
|
# changes, which invokes this unit via the `before`/`wantedBy` chain.
|
||||||
systemd.services.jellyfin-webhook-install = {
|
systemd.services.jellyfin-webhook-install = {
|
||||||
before = [ "jellyfin.service" ];
|
before = [ "jellyfin.service" ];
|
||||||
wantedBy = [ "jellyfin.service" ];
|
wantedBy = [ "jellyfin.service" ];
|
||||||
@@ -28,6 +34,13 @@ lib.mkIf config.services.jellyfin.enable {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services.jellyfin.restartTriggers = [
|
||||||
|
webhookPlugin.package
|
||||||
|
(webhookPlugin.mkInstallScript {
|
||||||
|
pluginsDir = "${config.services.jellyfin.dataDir}/plugins";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
# After Jellyfin starts, POST the plugin configuration so the webhook
|
# After Jellyfin starts, POST the plugin configuration so the webhook
|
||||||
# targets the monitor's receiver. Idempotent; runs on every boot.
|
# targets the monitor's receiver. Idempotent; runs on every boot.
|
||||||
systemd.services.jellyfin-webhook-configure = {
|
systemd.services.jellyfin-webhook-configure = {
|
||||||
|
|||||||
Reference in New Issue
Block a user