SearXNG: Difference between revisions

Added note about use_default_settings
Added secret_key setting through env file, added warning of NixOS-setting based approach
 
Line 16: Line 16:
     bind_address = "::1";
     bind_address = "::1";
     # port = yourPort;
     # port = yourPort;
    # WARNING: setting secret_key here might expose it to the nix cache
    # see below for the sops or environment file instructions to prevent this
     # secret_key = "Your secret key.";
     # secret_key = "Your secret key.";
   };
   };
Line 214: Line 216:
   };
   };
};
};
</syntaxhighlight>
==== Set secret key through environment file ====
<syntaxhighlight lang="nixos">
services.searx = {
  enable = true;
  package = pkgs.searxng;
  environmentFile = "/home/user/.searxng.env";
  settings = {
    general = {
      debug = false;
    };
    server = {
      bind_address = "127.0.0.1";
    };
  };
};
</syntaxhighlight><syntaxhighlight lang="ini">
# /home/user/.searxng.env
SEARXNG_SECRET=random-string
</syntaxhighlight>
</syntaxhighlight>