nixos/services.telegraf: remove with lib;
This commit is contained in:
parent
8eb355e978
commit
851d23320b
@ -1,7 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.telegraf;
|
||||
|
||||
@ -11,12 +8,12 @@ in {
|
||||
###### interface
|
||||
options = {
|
||||
services.telegraf = {
|
||||
enable = mkEnableOption "telegraf server";
|
||||
enable = lib.mkEnableOption "telegraf server";
|
||||
|
||||
package = mkPackageOption pkgs "telegraf" { };
|
||||
package = lib.mkPackageOption pkgs "telegraf" { };
|
||||
|
||||
environmentFiles = mkOption {
|
||||
type = types.listOf types.path;
|
||||
environmentFiles = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.path;
|
||||
default = [];
|
||||
example = [ "/run/keys/telegraf.env" ];
|
||||
description = ''
|
||||
@ -27,7 +24,7 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
extraConfig = lib.mkOption {
|
||||
default = {};
|
||||
description = "Extra configuration options for telegraf";
|
||||
type = settingsFormat.type;
|
||||
@ -47,7 +44,7 @@ in {
|
||||
|
||||
|
||||
###### implementation
|
||||
config = mkIf config.services.telegraf.enable {
|
||||
config = lib.mkIf config.services.telegraf.enable {
|
||||
services.telegraf.extraConfig = {
|
||||
inputs = {};
|
||||
outputs = {};
|
||||
|
Loading…
Reference in New Issue
Block a user