nixos/services.heapster: remove with lib;

This commit is contained in:
Felix Buehler 2024-08-30 00:46:58 +02:00
parent 95e5f256d6
commit baece5fb08

View File

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