forked from alxhlz/hcloud-failover-keepalived
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
35 lines (29 loc) · 959 Bytes
/
flake.nix
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
{
description = "Hetzner Robot - Failover IP and Private IP switchover - keepalived";
inputs.nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
outputs = { self, nixpkgs }@inputs: let
inherit (self) outputs;
supportedSystems = [ "x86_64-linux" ];
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
gen = system: (let
pkgs = import "${nixpkgs}" {
system = "x86_64-linux";
overlays = builtins.attrValues outputs.overlays;
};
in {
packages.${system} = {
default = pkgs.robot-failover;
inherit (pkgs) robot-failover failover-daemon;
};
checks.${system} = {
hcloud = pkgs.testers.runNixOSTest ./test.nix;
};
});
in {
overlays.default = import ./overlay.nix;
nixosModules = {
hcloud = import ./module.nix;
failover-daemon = import ./failover-daemon/module.nix;
};
} // (gen "x86_64-linux");
}