From ed8a0d8e5e1b1de29db72373471b201b69865812 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Fri, 10 Feb 2017 22:44:10 +0100 Subject: [PATCH] modules/searx: add package option (#22636) The user should be able to specify a patched version of searx. --- nixos/modules/services/networking/searx.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/networking/searx.nix b/nixos/modules/services/networking/searx.nix index b29db58af99b..b852e4e6dc86 100644 --- a/nixos/modules/services/networking/searx.nix +++ b/nixos/modules/services/networking/searx.nix @@ -34,6 +34,11 @@ in "; }; + package = mkOption { + default = pkgs.pythonPackages.searx; + description = "searx package to use."; + }; + }; }; @@ -61,14 +66,13 @@ in wantedBy = [ "multi-user.target" ]; serviceConfig = { User = "searx"; - ExecStart = "${pkgs.pythonPackages.searx}/bin/searx-run"; + ExecStart = "${cfg.package}/bin/searx-run"; }; } // (optionalAttrs (configFile != "") { environment.SEARX_SETTINGS_PATH = configFile; }); - - environment.systemPackages = [ pkgs.pythonPackages.searx ]; + environment.systemPackages = [ cfg.package ]; };