services/searxng: add environmentFile option

This commit is contained in:
2025-09-01 09:24:27 -07:00
parent 718bd8b41f
commit 79d1da2a6f

View File

@@ -18,11 +18,18 @@ in
{
options.searxng = {
enable = mkEnableOption "Enables searxng module";
environmentFile = mkOption {
type = types.path;
default = null;
description = "Path of encrypted environment file containing secrets for the searxng config";
example = "../secrets/searxng.env";
};
};
config = mkIf cfg.enable {
sops.secrets."SEARXNG_SECRETS" = {
sopsFile = ../../secrets/${config.networking.hostName}_searxng.env;
sopsFile = cfg.environmentFile;
format = "binary";
owner = "searxng";
mode = 0400;