From d9a644373a92b4e763d2c6aaa69ca9bcdc4253e3 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 27 Aug 2024 20:43:28 +0200 Subject: [PATCH] nixos/services.SystemdJournal2Gelf: remove `with lib;` --- .../services/logging/SystemdJournal2Gelf.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/nixos/modules/services/logging/SystemdJournal2Gelf.nix b/nixos/modules/services/logging/SystemdJournal2Gelf.nix index 7c50e9e2c42f..5b2f05f8c0f1 100644 --- a/nixos/modules/services/logging/SystemdJournal2Gelf.nix +++ b/nixos/modules/services/logging/SystemdJournal2Gelf.nix @@ -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" ];