mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-19 07:59:24 +03:00

After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
64 lines
1.4 KiB
Nix
64 lines
1.4 KiB
Nix
{ 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.";
|
|
};
|
|
|
|
};
|
|
|
|
}
|