0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

nixos/services.ulogd: remove with lib;

This commit is contained in:
Felix Buehler 2024-08-27 20:43:32 +02:00
parent 12cf354b83
commit 640892113a

View file

@ -1,6 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib;
let let
cfg = config.services.ulogd; cfg = config.services.ulogd;
settingsFormat = pkgs.formats.ini { listsAsDuplicateKeys = true; }; settingsFormat = pkgs.formats.ini { listsAsDuplicateKeys = true; };
@ -8,9 +6,9 @@ let
in { in {
options = { options = {
services.ulogd = { 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 = { example = {
global.stack = [ global.stack = [
"log1:NFLOG,base1:BASE,ifi1:IFINDEX,ip2str1:IP2STR,print1:PRINTPKT,emu1:LOGEMU" "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`."; "Configuration for ulogd. See {file}`/share/doc/ulogd/` in `pkgs.ulogd.doc`.";
}; };
logLevel = mkOption { logLevel = lib.mkOption {
type = types.enum [ 1 3 5 7 8 ]; type = lib.types.enum [ 1 3 5 7 8 ];
default = 5; default = 5;
description = description =
"Log level (1 = debug, 3 = info, 5 = notice, 7 = error, 8 = fatal)"; "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 = { systemd.services.ulogd = {
description = "Ulogd Daemon"; description = "Ulogd Daemon";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];