From 63f94577c98ded1f592fab3dbc41a196540b11cd Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Tue, 21 Mar 2023 23:56:47 +0000 Subject: [PATCH] nixos: Add working directory config option to quickpeepSearch --- nixos_modules/quickpeepSearch.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nixos_modules/quickpeepSearch.nix b/nixos_modules/quickpeepSearch.nix index f331ebf..af24ee4 100644 --- a/nixos_modules/quickpeepSearch.nix +++ b/nixos_modules/quickpeepSearch.nix @@ -49,6 +49,14 @@ with lib; ''; }; + workingDir = mkOption { + type = with types; path; + description = '' + Path to a working directory to run the web interface and indexer from. + This is the base from which paths in the config file are looked up from. + ''; + }; + autoIndexUrl = mkOption { default = null; type = with types; nullOr str; @@ -80,6 +88,7 @@ with lib; Type = "simple"; User = "${cfg.user}"; ExecStart = ''${quickpeep}/bin/quickpeep ${cfg.bindHost}:${builtins.toString cfg.bindPort}''; + WorkingDirectory = cfg.workingDir; }; }; @@ -90,6 +99,7 @@ with lib; Type = "simple"; User = "${cfg.user}"; ExecStart = ''${quickpeep}/bin/qp-indexer --config ${lib.strings.escapeShellArg cfg.configPath} --feed ${lib.strings.escapeShellArg cfg.autoIndexUrl}''; + WorkingDirectory = cfg.workingDir; }; };