···6768- `meta.mainProgram`: Changing this `meta` entry can lead to a package rebuild due to being used to determine the `NIX_MAIN_PROGRAM` environment variable.
6900070- `versionCheckHook`: Packages that previously relied solely on `pname` to locate the program used to version check, but have a differing `meta.mainProgram` entry, might now fail.
7172
···6768- `meta.mainProgram`: Changing this `meta` entry can lead to a package rebuild due to being used to determine the `NIX_MAIN_PROGRAM` environment variable.
6970+- `searx` was updated to use `envsubst` instead of `sed` for parsing secrets from environment variables.
71+ If your previous configuration included a secret reference like `server.secret_key = "@SEARX_SECRET_KEY@"`, you must migrate to the new envsubst syntax: `server.secret_key = "$SEARX_SECRET_KEY"`.
72+73- `versionCheckHook`: Packages that previously relied solely on `pname` to locate the program used to version check, but have a differing `meta.mainProgram` entry, might now fail.
7475
+6-11
nixos/modules/services/networking/searx.nix
···24 # write NixOS settings as JSON
25 (
26 umask 077
27- cp --no-preserve=mode ${settingsFile} settings.yml
28 )
29-30- # substitute environment variables
31- env -0 | while IFS='=' read -r -d ''' n v; do
32- sed "s#@$n@#$v#g" -i settings.yml
33- done
34 '';
3536 settingType =
···95 {
96 server.port = 8080;
97 server.bind_address = "0.0.0.0";
98- server.secret_key = "@SEARX_SECRET_KEY@";
99100- engines = lib.singleton {
101 name = "wolframalpha";
102 shortcut = "wa";
103- api_key = "@WOLFRAM_API_KEY@";
104 engine = "wolframalpha_api";
105- };
106 }
107 '';
108 description = ''
109 Searx settings.
110 These will be merged with (taking precedence over) the default configuration.
111- It's also possible to refer to environment variables (defined in [](#opt-services.searx.environmentFile)) using the syntax `@VARIABLE_NAME@`.
112113 ::: {.note}
114 For available settings, see the Searx [docs](https://docs.searxng.org/admin/settings/index.html).
···24 # write NixOS settings as JSON
25 (
26 umask 077
27+ ${pkgs.envsubst}/bin/envsubst < ${settingsFile} > settings.yml
28 )
0000029 '';
3031 settingType =
···90 {
91 server.port = 8080;
92 server.bind_address = "0.0.0.0";
93+ server.secret_key = "$SEARX_SECRET_KEY";
9495+ engines = [ {
96 name = "wolframalpha";
97 shortcut = "wa";
98+ api_key = "$WOLFRAM_API_KEY";
99 engine = "wolframalpha_api";
100+ } ];
101 }
102 '';
103 description = ''
104 Searx settings.
105 These will be merged with (taking precedence over) the default configuration.
106+ It's also possible to refer to environment variables (defined in [](#opt-services.searx.environmentFile)) using the syntax `$VARIABLE_NAME`.
107108 ::: {.note}
109 For available settings, see the Searx [docs](https://docs.searxng.org/admin/settings/index.html).