From 8491fdcc316d7fb9d9cd40b716639cf637e4ca51 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sat, 24 Aug 2024 22:05:35 +0200 Subject: [PATCH] nixos/services.pfix-srsd: remove `with lib;` --- nixos/modules/services/mail/pfix-srsd.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/nixos/modules/services/mail/pfix-srsd.nix b/nixos/modules/services/mail/pfix-srsd.nix index 7ad2b20454d0..d4176c509d7a 100644 --- a/nixos/modules/services/mail/pfix-srsd.nix +++ b/nixos/modules/services/mail/pfix-srsd.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - { ###### interface @@ -9,25 +6,25 @@ with lib; options = { services.pfix-srsd = { - enable = mkOption { + enable = lib.mkOption { default = false; - type = types.bool; + type = lib.types.bool; description = "Whether to run the postfix sender rewriting scheme daemon."; }; - domain = mkOption { + domain = lib.mkOption { description = "The domain for which to enable srs"; - type = types.str; + type = lib.types.str; example = "example.com"; }; - secretsFile = mkOption { + secretsFile = lib.mkOption { description = '' The secret data used to encode the SRS address. to generate, use a command like: `for n in $(seq 5); do dd if=/dev/urandom count=1 bs=1024 status=none | sha256sum | sed 's/ -$//' | sed 's/^/ /'; done` ''; - type = types.path; + type = lib.types.path; default = "/var/lib/pfix-srsd/secrets"; }; }; @@ -35,7 +32,7 @@ with lib; ###### implementation - config = mkIf config.services.pfix-srsd.enable { + config = lib.mkIf config.services.pfix-srsd.enable { environment = { systemPackages = [ pkgs.pfixtools ]; };