From baece5fb08e8a82eee684e413eaefeb699a43b4a Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Fri, 30 Aug 2024 00:46:58 +0200 Subject: [PATCH] nixos/services.heapster: remove `with lib;` --- .../modules/services/monitoring/heapster.nix | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/nixos/modules/services/monitoring/heapster.nix b/nixos/modules/services/monitoring/heapster.nix index b8ba3632caca..ea03ec46c55c 100644 --- a/nixos/modules/services/monitoring/heapster.nix +++ b/nixos/modules/services/monitoring/heapster.nix @@ -1,35 +1,32 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.heapster; in { options.services.heapster = { - enable = mkEnableOption "Heapster monitoring"; + enable = lib.mkEnableOption "Heapster monitoring"; - source = mkOption { + source = lib.mkOption { description = "Heapster metric source"; example = "kubernetes:https://kubernetes.default"; - type = types.str; + type = lib.types.str; }; - sink = mkOption { + sink = lib.mkOption { description = "Heapster metic sink"; example = "influxdb:http://localhost:8086"; - type = types.str; + type = lib.types.str; }; - extraOpts = mkOption { + extraOpts = lib.mkOption { description = "Heapster extra options"; default = ""; - type = types.separatedString " "; + type = lib.types.separatedString " "; }; - package = mkPackageOption pkgs "heapster" { }; + package = lib.mkPackageOption pkgs "heapster" { }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.heapster = { wantedBy = ["multi-user.target"]; after = ["cadvisor.service" "kube-apiserver.service"];