nixos/services.ulogd: remove with lib;
This commit is contained in:
parent
12cf354b83
commit
640892113a
@ -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" ];
|
||||
|
Loading…
Reference in New Issue
Block a user