diff options
author | Soispha <soispha@vhack.eu> | 2023-08-11 10:37:43 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-08-11 10:50:35 +0200 |
commit | df87e1dfd15cbd229ad3a7df3ded7544aadee75a (patch) | |
tree | 384f83a433cc69cee8fc2dcf18bc22e06b7fc175 /system/services | |
parent | Fix(system/service/invidious): Copy their script, to remove shell escape (diff) | |
download | nixos-server-df87e1dfd15cbd229ad3a7df3ded7544aadee75a.tar.gz nixos-server-df87e1dfd15cbd229ad3a7df3ded7544aadee75a.zip |
Fix(system/services/invidious): Force the new script option to be applied
Diffstat (limited to '')
-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 + ''); }; } |