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