about summary refs log tree commit diff
path: root/modules/searx.nix
diff options
context:
space:
mode:
authorazahi <azat@bahawi.net>2024-11-10 01:08:38 +0300
committerazahi <azat@bahawi.net>2024-11-10 01:08:38 +0300
commit693768ee37098dbebb38c86e27044f2faa38348d (patch)
tree37c92a1c83cf22fa5e5a570baa8598ba6063c795 /modules/searx.nix
parent2024-10-29 (diff)
2024-11-10 HEAD master
Diffstat (limited to 'modules/searx.nix')
-rw-r--r--modules/searx.nix13
1 files changed, 6 insertions, 7 deletions
diff --git a/modules/searx.nix b/modules/searx.nix
index de51a20..ab186af 100644
--- a/modules/searx.nix
+++ b/modules/searx.nix
@@ -5,28 +5,27 @@
   libNginx,
   ...
 }:
-with lib;
 let
   cfg = config.nixfiles.modules.searx;
 in
 {
   options.nixfiles.modules.searx = {
-    enable = mkEnableOption "SearX";
+    enable = lib.mkEnableOption "SearX";
 
-    port = mkOption {
+    port = lib.mkOption {
       description = "Port.";
-      type = with types; port;
+      type = with lib.types; port;
       default = 61001;
     };
 
-    domain = mkOption {
+    domain = lib.mkOption {
       description = "Domain name sans protocol scheme.";
-      type = with types; nullOr str;
+      type = with lib.types; nullOr str;
       default = "searx.${config.networking.domain}";
     };
   };
 
-  config = mkIf cfg.enable {
+  config = lib.mkIf cfg.enable {
     secrets.searx-environment = {
       file = "${inputs.self}/secrets/searx-environment";
       owner = "searx";

Consider giving Nix/NixOS a try! <3