diff --git a/nixos/modules/services/logging/ulogd.nix b/nixos/modules/services/logging/ulogd.nix index 5bd51ef88fe5..9d1d8e61231d 100644 --- a/nixos/modules/services/logging/ulogd.nix +++ b/nixos/modules/services/logging/ulogd.nix @@ -1,6 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; let cfg = config.services.ulogd; settingsFormat = pkgs.formats.ini { listsAsDuplicateKeys = true; }; @@ -8,9 +6,9 @@ let in { options = { services.ulogd = { - enable = mkEnableOption "ulogd, a userspace logging daemon for netfilter/iptables related logging"; + enable = lib.mkEnableOption "ulogd, a userspace logging daemon for netfilter/iptables related logging"; - settings = mkOption { + settings = lib.mkOption { example = { global.stack = [ "log1:NFLOG,base1:BASE,ifi1:IFINDEX,ip2str1:IP2STR,print1:PRINTPKT,emu1:LOGEMU" @@ -35,8 +33,8 @@ in { "Configuration for ulogd. See {file}`/share/doc/ulogd/` in `pkgs.ulogd.doc`."; }; - logLevel = mkOption { - type = types.enum [ 1 3 5 7 8 ]; + logLevel = lib.mkOption { + type = lib.types.enum [ 1 3 5 7 8 ]; default = 5; description = "Log level (1 = debug, 3 = info, 5 = notice, 7 = error, 8 = fatal)"; @@ -44,7 +42,7 @@ in { }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.ulogd = { description = "Ulogd Daemon"; wantedBy = [ "multi-user.target" ];