From 4e0ba37569670184e48e6bb5d5ebf345176dbf96 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 27 Aug 2024 20:43:29 +0200 Subject: [PATCH] nixos/services.fluentd: remove `with lib;` --- nixos/modules/services/logging/fluentd.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/nixos/modules/services/logging/fluentd.nix b/nixos/modules/services/logging/fluentd.nix index bbf905eca06b..fed5cacac37e 100644 --- a/nixos/modules/services/logging/fluentd.nix +++ b/nixos/modules/services/logging/fluentd.nix @@ -1,29 +1,26 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.fluentd; - pluginArgs = concatStringsSep " " (map (x: "-p ${x}") cfg.plugins); + pluginArgs = lib.concatStringsSep " " (map (x: "-p ${x}") cfg.plugins); in { ###### interface options = { services.fluentd = { - enable = mkEnableOption "fluentd, a data/log collector"; + enable = lib.mkEnableOption "fluentd, a data/log collector"; - config = mkOption { - type = types.lines; + config = lib.mkOption { + type = lib.types.lines; default = ""; description = "Fluentd config."; }; - package = mkPackageOption pkgs "fluentd" { }; + package = lib.mkPackageOption pkgs "fluentd" { }; - plugins = mkOption { - type = types.listOf types.path; + plugins = lib.mkOption { + type = lib.types.listOf lib.types.path; default = []; description = '' A list of plugin paths to pass into fluentd. It will make plugins defined in ruby files @@ -36,7 +33,7 @@ in { ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.fluentd = with pkgs; { description = "Fluentd Daemon"; wantedBy = [ "multi-user.target" ];