feat(servers): setup corosync
All checks were successful
Discord / discord commits (push) Successful in 29s
All checks were successful
Discord / discord commits (push) Successful in 29s
This commit is contained in:
parent
4ea15b6a9c
commit
c3df63c479
5 changed files with 29 additions and 1 deletions
|
@ -7,6 +7,9 @@ in {
|
||||||
../../modules/kmscon.nix
|
../../modules/kmscon.nix
|
||||||
../../modules/sshd.nix
|
../../modules/sshd.nix
|
||||||
../../modules/tailscale.nix
|
../../modules/tailscale.nix
|
||||||
|
|
||||||
|
./modules/corosync.nix
|
||||||
|
./modules/pacemaker.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
vars = {
|
vars = {
|
||||||
|
|
23
devices/cluster/modules/corosync.nix
Normal file
23
devices/cluster/modules/corosync.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{config, ...}: {
|
||||||
|
environment.etc."corosync/authkey" = {
|
||||||
|
source = config.sops.secrets.corosync.path;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.corosync = {
|
||||||
|
enable = true;
|
||||||
|
clusterName = "thingies";
|
||||||
|
|
||||||
|
nodelist = [
|
||||||
|
{
|
||||||
|
nodeid = 1;
|
||||||
|
name = "thingone";
|
||||||
|
ring_addrs = ["10.0.0.244"];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
nodeid = 2;
|
||||||
|
name = "thingtwo";
|
||||||
|
ring_addrs = ["10.0.0.159"];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -13,5 +13,7 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
disabledModules = [pacemakerPath];
|
disabledModules = [pacemakerPath];
|
||||||
import = ["${nixpkgs-pacemaker}/nixos/modules/${pacemakerPath}"];
|
imports = ["${nixpkgs-pacemaker}/nixos/modules/${pacemakerPath}"];
|
||||||
|
|
||||||
|
services.pacemaker.enable = true;
|
||||||
}
|
}
|
||||||
|
|
BIN
flake.lock
BIN
flake.lock
Binary file not shown.
BIN
flake.nix
BIN
flake.nix
Binary file not shown.
Loading…
Reference in a new issue