nixos/services.SystemdJournal2Gelf: remove with lib;

This commit is contained in:
Felix Buehler 2024-08-27 20:43:28 +02:00
parent 5eba86d6f2
commit d9a644373a

View File

@ -1,22 +1,19 @@
{ config, lib, pkgs, ... }:
with lib;
let cfg = config.services.SystemdJournal2Gelf;
in
{ options = {
services.SystemdJournal2Gelf = {
enable = mkOption {
type = types.bool;
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Whether to enable SystemdJournal2Gelf.
'';
};
graylogServer = mkOption {
type = types.str;
graylogServer = lib.mkOption {
type = lib.types.str;
example = "graylog2.example.com:11201";
description = ''
Host and port of your graylog2 input. This should be a GELF
@ -24,8 +21,8 @@ in
'';
};
extraOptions = mkOption {
type = types.separatedString " ";
extraOptions = lib.mkOption {
type = lib.types.separatedString " ";
default = "";
description = ''
Any extra flags to pass to SystemdJournal2Gelf. Note that
@ -33,12 +30,12 @@ in
'';
};
package = mkPackageOption pkgs "systemd-journal2gelf" { };
package = lib.mkPackageOption pkgs "systemd-journal2gelf" { };
};
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
systemd.services.SystemdJournal2Gelf = {
description = "SystemdJournal2Gelf";
after = [ "network.target" ];