Merge pull request #293950 from DCsunset/nixos-hoogle

nixos/hoogle: add extraOptions
This commit is contained in:
Fabián Heredia Montiel 2024-03-12 14:57:30 -06:00 committed by GitHub
commit da8768347e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,6 +56,16 @@ in {
description = lib.mdDoc "Set the host to bind on.";
default = "127.0.0.1";
};
extraOptions = mkOption {
type = types.listOf types.str;
default = [];
example = [ "--no-security-headers" ];
description = lib.mdDoc ''
Additional command-line arguments to pass to
{command}`hoogle server`
'';
};
};
config = mkIf cfg.enable {
@ -66,7 +76,10 @@ in {
serviceConfig = {
Restart = "always";
ExecStart = ''${hoogleEnv}/bin/hoogle server --local --port ${toString cfg.port} --home ${cfg.home} --host ${cfg.host}'';
ExecStart = ''
${hoogleEnv}/bin/hoogle server --local --port ${toString cfg.port} --home ${cfg.home} --host ${cfg.host} \
${concatStringsSep " " cfg.extraOptions}
'';
DynamicUser = true;