diff options
Diffstat (limited to 'system/services/invidious/default.nix')
-rw-r--r-- | system/services/invidious/default.nix | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/system/services/invidious/default.nix b/system/services/invidious/default.nix index f51fc3d..e9ac768 100644 --- a/system/services/invidious/default.nix +++ b/system/services/invidious/default.nix @@ -22,7 +22,7 @@ in { systemd.services.invidious.serviceConfig = { LoadCredential = "hmac:${config.age.secrets.invidiousHmac.path}"; - script = let + ExecStart = let # taken from the invidious module settingsFormat = pkgs.formats.json {}; settingsFile = settingsFormat.generate "invidious-settings" cfg.settings; @@ -37,9 +37,10 @@ in { jqFiles = settingsFile + lib.optionalString (cfg.extraSettingsFile != null) " \"${cfg.extraSettingsFile}\""; - in '' - export INVIDIOUS_CONFIG="$(${pkgs.jq}/bin/jq -s "${jqFilter}" ${jqFiles})" - exec ${cfg.package}/bin/invidious - ''; + in + lib.mkForce (pkgs.writeScript "start-invidious" '' + export INVIDIOUS_CONFIG="$(${pkgs.jq}/bin/jq -s "${jqFilter}" ${jqFiles})" + exec ${cfg.package}/bin/invidious + ''); }; } |