From 66fecabb5fe0615253775114b6a6db235eda87fd Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Fri, 30 Aug 2024 00:46:41 +0200 Subject: [PATCH] nixos/services.plikd: remove `with lib;` --- nixos/modules/services/misc/plikd.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/nixos/modules/services/misc/plikd.nix b/nixos/modules/services/misc/plikd.nix index ec94cfc02979..477c1b413fd0 100644 --- a/nixos/modules/services/misc/plikd.nix +++ b/nixos/modules/services/misc/plikd.nix @@ -1,7 +1,4 @@ { config, pkgs, lib, ... }: - -with lib; - let cfg = config.services.plikd; @@ -11,15 +8,15 @@ in { options = { services.plikd = { - enable = mkEnableOption "plikd, a temporary file upload system"; + enable = lib.mkEnableOption "plikd, a temporary file upload system"; - openFirewall = mkOption { - type = types.bool; + openFirewall = lib.mkOption { + type = lib.types.bool; default = false; description = "Open ports in the firewall for the plikd."; }; - settings = mkOption { + settings = lib.mkOption { type = format.type; default = {}; description = '' @@ -30,8 +27,8 @@ in }; }; - config = mkIf cfg.enable { - services.plikd.settings = mapAttrs (name: mkDefault) { + config = lib.mkIf cfg.enable { + services.plikd.settings = lib.mapAttrs (name: lib.mkDefault) { ListenPort = 8080; ListenAddress = "localhost"; DataBackend = "file"; @@ -75,7 +72,7 @@ in }; }; - networking.firewall = mkIf cfg.openFirewall { + networking.firewall = lib.mkIf cfg.openFirewall { allowedTCPPorts = [ cfg.settings.ListenPort ]; }; };