nixos/services.opentsdb: remove with lib;

This commit is contained in:
Felix Buehler
2024-08-30 00:30:40 +02:00
parent 93fb328e44
commit 6bbc3df0dd
+11 -14
View File
@@ -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";