nixos/services.fluentd: remove with lib;
This commit is contained in:
parent
e2a2735d4d
commit
4e0ba37569
@ -1,29 +1,26 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.services.fluentd;
|
cfg = config.services.fluentd;
|
||||||
|
|
||||||
pluginArgs = concatStringsSep " " (map (x: "-p ${x}") cfg.plugins);
|
pluginArgs = lib.concatStringsSep " " (map (x: "-p ${x}") cfg.plugins);
|
||||||
in {
|
in {
|
||||||
###### interface
|
###### interface
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
services.fluentd = {
|
services.fluentd = {
|
||||||
enable = mkEnableOption "fluentd, a data/log collector";
|
enable = lib.mkEnableOption "fluentd, a data/log collector";
|
||||||
|
|
||||||
config = mkOption {
|
config = lib.mkOption {
|
||||||
type = types.lines;
|
type = lib.types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = "Fluentd config.";
|
description = "Fluentd config.";
|
||||||
};
|
};
|
||||||
|
|
||||||
package = mkPackageOption pkgs "fluentd" { };
|
package = lib.mkPackageOption pkgs "fluentd" { };
|
||||||
|
|
||||||
plugins = mkOption {
|
plugins = lib.mkOption {
|
||||||
type = types.listOf types.path;
|
type = lib.types.listOf lib.types.path;
|
||||||
default = [];
|
default = [];
|
||||||
description = ''
|
description = ''
|
||||||
A list of plugin paths to pass into fluentd. It will make plugins defined in ruby files
|
A list of plugin paths to pass into fluentd. It will make plugins defined in ruby files
|
||||||
@ -36,7 +33,7 @@ in {
|
|||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
systemd.services.fluentd = with pkgs; {
|
systemd.services.fluentd = with pkgs; {
|
||||||
description = "Fluentd Daemon";
|
description = "Fluentd Daemon";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
Loading…
Reference in New Issue
Block a user