about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/services/networking/keepalived/vrrp-script-options.nix
blob: df7a89cff8cdd42fff11de61c6af7c62ca3ee197 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{ lib } :

with lib;
with lib.types;
{
  options = {

    script = mkOption {
      type = str;
      example = literalExpression ''"''${pkgs.curl} -f http://localhost:80"'';
      description = "(Path of) Script command to execute followed by args, i.e. cmd [args]...";
    };

    interval = mkOption {
      type = int;
      default = 1;
      description = "Seconds between script invocations.";
    };

    timeout = mkOption {
      type = int;
      default = 5;
      description = "Seconds after which script is considered to have failed.";
    };

    weight = mkOption {
      type = int;
      default = 0;
      description = "Following a failure, adjust the priority by this weight.";
    };

    rise = mkOption {
      type = int;
      default = 5;
      description = "Required number of successes for OK transition.";
    };

    fall = mkOption {
      type = int;
      default = 3;
      description = "Required number of failures for KO transition.";
    };

    user = mkOption {
      type = str;
      default = "keepalived_script";
      description = "Name of user to run the script under.";
    };

    group = mkOption {
      type = nullOr str;
      default = null;
      description = "Name of group to run the script under. Defaults to user group.";
    };

    extraConfig = mkOption {
      type = lines;
      default = "";
      description = "Extra lines to be added verbatim to the vrrp_script section.";
    };

  };

}