summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/default.nix5
-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
4 files changed, 49 insertions, 58 deletions
diff --git a/config/default.nix b/config/default.nix
index c4a8277..a0b61aa 100644
--- a/config/default.nix
+++ b/config/default.nix
@@ -1,4 +1,5 @@
-{modulesPath, ...}: {
+{ modulesPath, ... }:
+{
imports = [
(modulesPath + "/profiles/headless.nix")
(modulesPath + "/profiles/minimal.nix")
@@ -17,5 +18,5 @@
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
- system.stateVersion = "25.05"; # Did you read the comment?
+ system.stateVersion = "25.11"; # Did you read the comment?
}
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"