From 4beedae4a124fc282808756add5292277b9c3c1d Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 29 Dec 2024 21:50:38 +0100 Subject: [PATCH] nixos/services.tang: remove `with lib;` --- nixos/modules/services/security/tang.nix | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/nixos/modules/services/security/tang.nix b/nixos/modules/services/security/tang.nix index 3d65a5cf6ead..6bf03d107def 100644 --- a/nixos/modules/services/security/tang.nix +++ b/nixos/modules/services/security/tang.nix @@ -4,23 +4,22 @@ pkgs, ... }: -with lib; let cfg = config.services.tang; in { options.services.tang = { - enable = mkEnableOption "tang"; + enable = lib.mkEnableOption "tang"; - package = mkOption { - type = types.package; + package = lib.mkOption { + type = lib.types.package; default = pkgs.tang; - defaultText = literalExpression "pkgs.tang"; + defaultText = lib.literalExpression "pkgs.tang"; description = "The tang package to use."; }; - listenStream = mkOption { - type = with types; listOf str; + listenStream = lib.mkOption { + type = with lib.types; listOf str; default = [ "7654" ]; example = [ "198.168.100.1:7654" @@ -33,9 +32,9 @@ in ''; }; - ipAddressAllow = mkOption { + ipAddressAllow = lib.mkOption { example = [ "192.168.1.0/24" ]; - type = types.listOf types.str; + type = lib.types.listOf lib.types.str; description = '' Whitelist a list of address prefixes. Preferably, internal addresses should be used. @@ -43,7 +42,7 @@ in }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { environment.systemPackages = [ cfg.package ]; systemd.services."tangd@" = {