changed nix options
This commit is contained in:
parent
b53e982317
commit
987cc3cc71
@ -21,19 +21,8 @@ in {
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
type = with types; let
|
||||
valueType = nullOr (oneOf [
|
||||
# TODO: restrict type to actual config file structure
|
||||
bool
|
||||
int
|
||||
float
|
||||
str
|
||||
path
|
||||
(attrsOf valueType)
|
||||
(listOf valueType)
|
||||
]);
|
||||
in
|
||||
valueType;
|
||||
type = with types; attrsOf (either str int);
|
||||
|
||||
default = {
|
||||
logFile = throw "Please specify outage-detector.settings.";
|
||||
host = "1.1.1.1";
|
||||
@ -47,7 +36,7 @@ in {
|
||||
|
||||
systemd.services.outage-detector = mkIf (cfg.timer
|
||||
!= null) {
|
||||
script = "${package}/bin/outage_detector log ${cfg.settings.logFile} --host ${cfg.settings.host} --timeout ${cfg.settings.timeout}";
|
||||
script = "${package}/bin/outage_detector log ${cfg.settings.logFile} --host ${cfg.settings.host} --timeout ${toString cfg.settings.timeout}";
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
|
Loading…
Reference in New Issue
Block a user