summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-08-11 10:37:43 +0200
committerSoispha <soispha@vhack.eu>2023-08-11 10:50:35 +0200
commitdf87e1dfd15cbd229ad3a7df3ded7544aadee75a (patch)
tree384f83a433cc69cee8fc2dcf18bc22e06b7fc175
parentFix(system/service/invidious): Copy their script, to remove shell escape (diff)
downloadnixos-server-df87e1dfd15cbd229ad3a7df3ded7544aadee75a.tar.gz
nixos-server-df87e1dfd15cbd229ad3a7df3ded7544aadee75a.zip
Fix(system/services/invidious): Force the new script option to be applied
-rw-r--r--system/services/invidious/default.nix11
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
+      '');
   };
 }