mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 04:19:00 +02:00
nixos/unifi-poller: rename to unpoller.
This commit is contained in:
parent
40ddf3e2c6
commit
ffcd97b521
|
@ -724,7 +724,7 @@
|
|||
./services/monitoring/thanos.nix
|
||||
./services/monitoring/tremor-rs.nix
|
||||
./services/monitoring/tuptime.nix
|
||||
./services/monitoring/unifi-poller.nix
|
||||
./services/monitoring/unpoller.nix
|
||||
./services/monitoring/ups.nix
|
||||
./services/monitoring/uptime.nix
|
||||
./services/monitoring/vmagent.nix
|
||||
|
|
|
@ -3,15 +3,19 @@
|
|||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.unifi-poller;
|
||||
cfg = config.services.unpoller;
|
||||
|
||||
configFile = pkgs.writeText "unifi-poller.json" (generators.toJSON {} {
|
||||
configFile = pkgs.writeText "unpoller.json" (generators.toJSON {} {
|
||||
inherit (cfg) poller influxdb loki prometheus unifi;
|
||||
});
|
||||
|
||||
in {
|
||||
options.services.unifi-poller = {
|
||||
enable = mkEnableOption (lib.mdDoc "unifi-poller");
|
||||
imports = [
|
||||
(lib.mkRenamedOptionModule [ "services" "unifi-poller" ] [ "services" "unpoller" ])
|
||||
];
|
||||
|
||||
options.services.unpoller = {
|
||||
enable = mkEnableOption (lib.mdDoc "unpoller");
|
||||
|
||||
poller = {
|
||||
debug = mkOption {
|
||||
|
@ -86,8 +90,8 @@ in {
|
|||
};
|
||||
pass = mkOption {
|
||||
type = types.path;
|
||||
default = pkgs.writeText "unifi-poller-influxdb-default.password" "unifipoller";
|
||||
defaultText = literalExpression "unifi-poller-influxdb-default.password";
|
||||
default = pkgs.writeText "unpoller-influxdb-default.password" "unifipoller";
|
||||
defaultText = literalExpression "unpoller-influxdb-default.password";
|
||||
description = lib.mdDoc ''
|
||||
Path of a file containing the password for influxdb.
|
||||
This file needs to be readable by the unifi-poller user.
|
||||
|
@ -135,8 +139,8 @@ in {
|
|||
};
|
||||
pass = mkOption {
|
||||
type = types.path;
|
||||
default = pkgs.writeText "unifi-poller-loki-default.password" "";
|
||||
defaultText = "unifi-poller-influxdb-default.password";
|
||||
default = pkgs.writeText "unpoller-loki-default.password" "";
|
||||
defaultText = "unpoller-influxdb-default.password";
|
||||
description = lib.mdDoc ''
|
||||
Path of a file containing the password for Loki.
|
||||
This file needs to be readable by the unifi-poller user.
|
||||
|
@ -184,8 +188,8 @@ in {
|
|||
};
|
||||
pass = mkOption {
|
||||
type = types.path;
|
||||
default = pkgs.writeText "unifi-poller-unifi-default.password" "unifi";
|
||||
defaultText = literalExpression "unifi-poller-unifi-default.password";
|
||||
default = pkgs.writeText "unpoller-unifi-default.password" "unifi";
|
||||
defaultText = literalExpression "unpoller-unifi-default.password";
|
||||
description = lib.mdDoc ''
|
||||
Path of a file containing the password for the unifi service user.
|
||||
This file needs to be readable by the unifi-poller user.
|
||||
|
@ -303,7 +307,7 @@ in {
|
|||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.unifi-poller}/bin/unifi-poller --config ${configFile}";
|
||||
ExecStart = "${pkgs.unpoller}/bin/unpoller --config ${configFile}";
|
||||
Restart = "always";
|
||||
PrivateTmp = true;
|
||||
ProtectHome = true;
|
Loading…
Reference in a new issue