From 6bbc3df0dd093f170f0491c821dd3da22db47e12 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 27 Aug 2024 20:43:00 +0200 Subject: [PATCH] nixos/services.opentsdb: remove `with lib;` --- nixos/modules/services/databases/opentsdb.nix | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/nixos/modules/services/databases/opentsdb.nix b/nixos/modules/services/databases/opentsdb.nix index e104c42f8b24..90268daec1d7 100644 --- a/nixos/modules/services/databases/opentsdb.nix +++ b/nixos/modules/services/databases/opentsdb.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.opentsdb; @@ -15,36 +12,36 @@ in { services.opentsdb = { - enable = mkEnableOption "OpenTSDB"; + enable = lib.mkEnableOption "OpenTSDB"; - package = mkPackageOption pkgs "opentsdb" { }; + package = lib.mkPackageOption pkgs "opentsdb" { }; - user = mkOption { - type = types.str; + user = lib.mkOption { + type = lib.types.str; default = "opentsdb"; description = '' User account under which OpenTSDB runs. ''; }; - group = mkOption { - type = types.str; + group = lib.mkOption { + type = lib.types.str; default = "opentsdb"; description = '' Group account under which OpenTSDB runs. ''; }; - port = mkOption { - type = types.port; + port = lib.mkOption { + type = lib.types.port; default = 4242; description = '' Which port OpenTSDB listens on. ''; }; - config = mkOption { - type = types.lines; + config = lib.mkOption { + type = lib.types.lines; default = '' tsd.core.auto_create_metrics = true tsd.http.request.enable_chunked = true @@ -60,7 +57,7 @@ in { ###### implementation - config = mkIf config.services.opentsdb.enable { + config = lib.mkIf config.services.opentsdb.enable { systemd.services.opentsdb = { description = "OpenTSDB Server";