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 35 additions and 5 deletions
|
@ -7,6 +7,9 @@ in {
|
|||
../../modules/kmscon.nix
|
||||
../../modules/sshd.nix
|
||||
../../modules/tailscale.nix
|
||||
|
||||
./modules/corosync.nix
|
||||
./modules/pacemaker.nix
|
||||
];
|
||||
|
||||
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];
|
||||
import = ["${nixpkgs-pacemaker}/nixos/modules/${pacemakerPath}"];
|
||||
imports = ["${nixpkgs-pacemaker}/nixos/modules/${pacemakerPath}"];
|
||||
|
||||
services.pacemaker.enable = true;
|
||||
}
|
||||
|
|
8
flake.lock
generated
8
flake.lock
generated
|
@ -1316,11 +1316,11 @@
|
|||
"sops-nix": "sops-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1705530924,
|
||||
"narHash": "sha256-AQZ5Ojmxv8W97b2L7ZrcKnGt6rIqzDdItNF/AzqBIaU=",
|
||||
"lastModified": 1705892745,
|
||||
"narHash": "sha256-MlH+FZTtHmguvhUlMehmnUjEaDw4ah9mOT+dLEHT9sc=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "43ac719e0cfe8ae908630a28fe3ed3cf8ab46aa2",
|
||||
"revCount": 33,
|
||||
"rev": "66809b35f0f511babb90f85abae3a1203f43b478",
|
||||
"revCount": 35,
|
||||
"type": "git",
|
||||
"url": "ssh://git@git.nelim.org/matt1432/nixos-secrets"
|
||||
},
|
||||
|
|
|
@ -51,9 +51,11 @@
|
|||
# Cluster
|
||||
thingone = mkNixOS [
|
||||
(import ./devices/cluster "thingone")
|
||||
secrets.nixosModules.thingy
|
||||
];
|
||||
thingtwo = mkNixOS [
|
||||
(import ./devices/cluster "thingtwo")
|
||||
secrets.nixosModules.thingy
|
||||
];
|
||||
|
||||
live-image = mkNixOS [
|
||||
|
|
Loading…
Add table
Reference in a new issue