about summary refs log tree commit diff
path: root/nixos/modules/services
diff options
context:
space:
mode:
authorFabián Heredia Montiel <303897+fabianhjr@users.noreply.github.com>2024-03-12 14:57:30 -0600
committerGitHub <noreply@github.com>2024-03-12 14:57:30 -0600
commitda8768347ef04d4d99f6a98d1b18fd69c945d3c2 (patch)
tree5351029b1e5bb8ed5a2102c41903ea59bc8c56eb /nixos/modules/services
parentda36fcd4f5e489c528c29c8a128c242e23f1c45b (diff)
parent38261d955670cfebe1653700af56a6a6cabdfd12 (diff)
downloadnixlib-da8768347ef04d4d99f6a98d1b18fd69c945d3c2.tar
nixlib-da8768347ef04d4d99f6a98d1b18fd69c945d3c2.tar.gz
nixlib-da8768347ef04d4d99f6a98d1b18fd69c945d3c2.tar.bz2
nixlib-da8768347ef04d4d99f6a98d1b18fd69c945d3c2.tar.lz
nixlib-da8768347ef04d4d99f6a98d1b18fd69c945d3c2.tar.xz
nixlib-da8768347ef04d4d99f6a98d1b18fd69c945d3c2.tar.zst
nixlib-da8768347ef04d4d99f6a98d1b18fd69c945d3c2.zip
Merge pull request #293950 from DCsunset/nixos-hoogle
nixos/hoogle: add extraOptions
Diffstat (limited to 'nixos/modules/services')
-rw-r--r--nixos/modules/services/development/hoogle.nix15
1 files changed, 14 insertions, 1 deletions
diff --git a/nixos/modules/services/development/hoogle.nix b/nixos/modules/services/development/hoogle.nix
index 88dd01fd8aab..c90bb7f01902 100644
--- a/nixos/modules/services/development/hoogle.nix
+++ b/nixos/modules/services/development/hoogle.nix
@@ -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;