nixos/services.fluentd: remove with lib;

This commit is contained in:
Felix Buehler 2024-08-27 20:43:29 +02:00
parent e2a2735d4d
commit 4e0ba37569

View File

@ -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" ];