about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorFelix Buehler2024-08-24 22:05:45 +0200
committerFelix Buehler2024-08-30 23:00:51 +0200
commita442c73bff962d2468f79d14324eb581e19cd26e (patch)
treedc57ea27d8d332bf704b508092ed15b7406de37f /nixos
parentbd471d7eb10eee6adc99b499b49487afd1172cdc (diff)
nixos/services.irkerd: remove `with lib;`
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/misc/irkerd.nix25
1 files changed, 11 insertions, 14 deletions
diff --git a/nixos/modules/services/misc/irkerd.nix b/nixos/modules/services/misc/irkerd.nix
index 993d77ba424c..28966c4ae226 100644
--- a/nixos/modules/services/misc/irkerd.nix
+++ b/nixos/modules/services/misc/irkerd.nix
@@ -1,29 +1,26 @@
 { config, lib, pkgs, ... }:
-
-with lib;
-
 let
   cfg = config.services.irkerd;
   ports = [ 6659 ];
 in
 {
   options.services.irkerd = {
-    enable = mkOption {
+    enable = lib.mkOption {
       description = "Whether to enable irker, an IRC notification daemon.";
       default = false;
-      type = types.bool;
+      type = lib.types.bool;
     };
 
-    openPorts = mkOption {
+    openPorts = lib.mkOption {
       description = "Open ports in the firewall for irkerd";
       default = false;
-      type = types.bool;
+      type = lib.types.bool;
     };
 
-    listenAddress = mkOption {
+    listenAddress = lib.mkOption {
       default = "localhost";
       example = "0.0.0.0";
-      type = types.str;
+      type = lib.types.str;
       description = ''
         Specifies the bind address on which the irker daemon listens.
         The default is localhost.
@@ -33,14 +30,14 @@ in
       '';
     };
 
-    nick = mkOption {
+    nick = lib.mkOption {
       default = "irker";
-      type = types.str;
+      type = lib.types.str;
       description = "Nick to use for irker";
     };
   };
 
-  config = mkIf cfg.enable {
+  config = lib.mkIf cfg.enable {
     systemd.services.irkerd = {
       description = "Internet Relay Chat (IRC) notification daemon";
       documentation = [ "man:irkerd(8)" "man:irkerhook(1)" "man:irk(1)" ];
@@ -61,7 +58,7 @@ in
     };
     users.groups.irkerd = {};
 
-    networking.firewall.allowedTCPPorts = mkIf cfg.openPorts ports;
-    networking.firewall.allowedUDPPorts = mkIf cfg.openPorts ports;
+    networking.firewall.allowedTCPPorts = lib.mkIf cfg.openPorts ports;
+    networking.firewall.allowedUDPPorts = lib.mkIf cfg.openPorts ports;
   };
 }