0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

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, ... }: { config, lib, pkgs, ... }:
with lib;
let cfg = config.services.SystemdJournal2Gelf; let cfg = config.services.SystemdJournal2Gelf;
in in
{ options = { { options = {
services.SystemdJournal2Gelf = { services.SystemdJournal2Gelf = {
enable = mkOption { enable = lib.mkOption {
type = types.bool; type = lib.types.bool;
default = false; default = false;
description = '' description = ''
Whether to enable SystemdJournal2Gelf. Whether to enable SystemdJournal2Gelf.
''; '';
}; };
graylogServer = mkOption { graylogServer = lib.mkOption {
type = types.str; type = lib.types.str;
example = "graylog2.example.com:11201"; example = "graylog2.example.com:11201";
description = '' description = ''
Host and port of your graylog2 input. This should be a GELF Host and port of your graylog2 input. This should be a GELF
@ -24,8 +21,8 @@ in
''; '';
}; };
extraOptions = mkOption { extraOptions = lib.mkOption {
type = types.separatedString " "; type = lib.types.separatedString " ";
default = ""; default = "";
description = '' description = ''
Any extra flags to pass to SystemdJournal2Gelf. Note that 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 = { systemd.services.SystemdJournal2Gelf = {
description = "SystemdJournal2Gelf"; description = "SystemdJournal2Gelf";
after = [ "network.target" ]; after = [ "network.target" ];