summaryrefslogtreecommitdiff
path: root/config/services
diff options
context:
space:
mode:
authorquentin@aristote.fr <quentin@aristote.fr>2025-11-30 21:00:04 +0100
committerquentin@aristote.fr <quentin@aristote.fr>2025-11-30 21:44:42 +0100
commit307591d1ef64e2053994185c4173b8391f6ef96f (patch)
treebb566dd465446c48113222132e9f889b235f9583 /config/services
parent72ea5118e6dcc93d53053df09a009fd5bc824bec (diff)
nixos 25.05 -> 25.11
- tests: enable isNspawnContainer - searx: remove morty (deprecated) Flake lock file updates: • Updated input 'my-nixpkgs': 'github:qaristote/my-nixpkgs/c032f4c09c83feb933d520ccce80e70a1516ca35' (2025-11-21) → 'github:qaristote/my-nixpkgs/e6d25dc678fa289ba488907e3cd49f2f8c330680' (2025-11-30) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/1c8ba8d3f7634acac4a2094eef7c32ad9106532c' (2025-11-24) → 'github:NixOS/nixpkgs/d542db745310b6929708d9abea513f3ff19b1341' (2025-11-30)
Diffstat (limited to 'config/services')
-rw-r--r--config/services/web/searx/default.nix51
-rw-r--r--config/services/web/searx/morty/default.nix20
-rw-r--r--config/services/web/searx/searx/default.nix31
3 files changed, 46 insertions, 56 deletions
diff --git a/config/services/web/searx/default.nix b/config/services/web/searx/default.nix
index 5998068..da4cf88 100644
--- a/config/services/web/searx/default.nix
+++ b/config/services/web/searx/default.nix
@@ -1,35 +1,40 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ ...
+}:
let
cfg = {
searx = config.services.searx;
filtron = config.services.filtron;
};
-in {
- imports = [ ./searx ./filtron ./morty ];
+in
+{
+ imports = [
+ ./searx
+ ./filtron
+ ];
- services.nginx.virtualHosts.searx =
- lib.mkIf (cfg.searx.enable && cfg.filtron.enable) {
- serverName = "searx.${config.networking.domain}";
- locations = {
- "/" = {
- proxyPass = "http://${cfg.filtron.listen.address}:${
- toString cfg.filtron.listen.port
- }";
- extraConfig = ''
- proxy_set_header Host $host;
- proxy_set_header Connection $http_connection;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Scheme $scheme;
- # proxy_set_header X-Script-Name /;
- '';
- };
- "/static/".alias = "${cfg.searx.package}/share/static/";
+ services.nginx.virtualHosts.searx = lib.mkIf (cfg.searx.enable && cfg.filtron.enable) {
+ serverName = "searx.${config.networking.domain}";
+ locations = {
+ "/" = {
+ proxyPass = "http://${cfg.filtron.listen.address}:${toString cfg.filtron.listen.port}";
+ extraConfig = ''
+ proxy_set_header Host $host;
+ proxy_set_header Connection $http_connection;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Scheme $scheme;
+ # proxy_set_header X-Script-Name /;
+ '';
};
- forceSSL = true;
- enableACME = true;
+ "/static/".alias = "${cfg.searx.package}/share/static/";
};
+ forceSSL = true;
+ enableACME = true;
+ };
systemd.services.uwsgi.personal.monitor = true;
}
diff --git a/config/services/web/searx/morty/default.nix b/config/services/web/searx/morty/default.nix
deleted file mode 100644
index af48fda..0000000
--- a/config/services/web/searx/morty/default.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ config, lib, ... }:
-
-let cfg = config.services.morty;
-in {
- services.nginx.virtualHosts.searx.locations =
- lib.mkIf cfg.enable {
- "/morty/" = {
- proxyPass = "http://127.0.0.1:${toString cfg.port}";
- extraConfig = ''
- proxy_set_header Host $host;
- proxy_set_header Connection $http_connection;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Scheme $scheme;
- '';
- };
- };
-
- services.morty = { enable = false; };
-}
diff --git a/config/services/web/searx/searx/default.nix b/config/services/web/searx/searx/default.nix
index f109258..003e7dc 100644
--- a/config/services/web/searx/searx/default.nix
+++ b/config/services/web/searx/searx/default.nix
@@ -1,24 +1,26 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ pkgs,
+ ...
+}:
let
- cfg = {
- morty = config.services.morty;
- filtron = config.services.filtron;
- };
-in {
+ cfg.filtron = config.services.filtron;
+in
+{
imports = [ ./engines.nix ];
services.searx = {
enable = true;
package = pkgs.searxng;
- runInUwsgi = true;
+ configureUwsgi = true;
uwsgiConfig = {
cache2 = "name=searxcache,items=2000,blocks=2000,blocksize=4096,bitmap=1";
http = ":${toString cfg.filtron.target.port}";
};
- environmentFile = /etc/searx/secrets;
+ environmentFile = "/etc/searx/secrets";
settings = {
use_default_settings = true;
general = {
@@ -29,7 +31,10 @@ in {
search = {
autocomplete = "wikipedia";
default_lang = "all";
- formats = [ "html" "json" ];
+ formats = [
+ "html"
+ "json"
+ ];
};
server = {
secret_key = "@SECRET_KEY@";
@@ -37,10 +42,10 @@ in {
http_protocol_version = "1.0";
method = "GET";
};
- ui = { theme_args = { oscar_style = "pointhi"; }; };
- result_proxy = lib.mkIf cfg.morty.enable {
- url = "http://searx.${config.networking.domain}/morty";
- key = ''!!binary | "${cfg.morty.key}"'';
+ ui = {
+ theme_args = {
+ oscar_style = "pointhi";
+ };
};
enabled_plugins = [
"Open Access DOI rewrite"