chore: update pacemaker config
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-02-01 11:48:38 -05:00
parent 5ceef68fe1
commit 97a8bc6aa4
6 changed files with 38 additions and 33 deletions

View file

@ -1,7 +1,7 @@
deviceName: {config, ...}: let
inherit (config.vars) mainUser hostName;
clusterIP = config.services.pacemaker.virtualIps.caddy-vip.ip;
clusterIP = config.services.pcsd.virtualIps.caddy-vip.ip;
in {
imports = [
./hardware-configuration.nix
@ -10,7 +10,7 @@ in {
../../modules/sshd.nix
../../modules/tailscale.nix
./modules/pacemaker.nix
./modules/pcsd.nix
];
vars = {

View file

@ -9,7 +9,7 @@
caddy = caddy-plugins.packages.${pkgs.system}.default;
clusterIP = config.services.pacemaker.virtualIps.caddy-vip.ip;
clusterIP = config.services.pcsd.virtualIps.caddy-vip.ip;
in {
imports = [caddy-plugins.nixosModules.default];

View file

@ -9,7 +9,7 @@
inherit (config.vars) mainUser hostName;
headscale-flake = headscale.packages.${pkgs.system}.headscale;
clusterIP = config.services.pacemaker.virtualIps.caddy-vip.ip;
clusterIP = config.services.pcsd.virtualIps.caddy-vip.ip;
in {
environment.systemPackages = [headscale-flake];
users.users.${mainUser}.extraGroups = ["headscale"];

View file

@ -1,12 +1,12 @@
{
config,
pacemaker,
pcsd,
...
}: let
inherit (config.sops) secrets;
in {
imports = [
pacemaker.nixosModules.default
pcsd.nixosModules.default
./blocky.nix
./caddy.nix
@ -15,7 +15,7 @@ in {
./unbound.nix
];
services.pacemaker = {
services.pcsd = {
enable = true;
clusterName = "thingies";
@ -58,14 +58,18 @@ in {
nodes = [
{
nodeid = 1;
name = "thingone";
ring_addrs = ["10.0.0.244"];
nodeid = "1";
addrs = [
{addr = "10.0.0.244";}
];
}
{
nodeid = 2;
name = "thingtwo";
ring_addrs = ["10.0.0.159"];
nodeid = "2";
addrs = [
{addr = "10.0.0.159";}
];
}
];
};

View file

@ -948,6 +948,7 @@
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"rev": "612f97239e2cc474c13c9dafa0df378058c5ad8d",
"type": "github"
}
},
@ -1068,25 +1069,6 @@
"type": "github"
}
},
"pacemaker": {
"inputs": {
"nixpkgs": "nixpkgs_8",
"nixpkgs-pacemaker": "nixpkgs-pacemaker"
},
"locked": {
"lastModified": 1706586193,
"narHash": "sha256-TxBiyKYsIxQY6zZZb3XcZ9tF8BupRJwMpoCjyJVCxQc=",
"owner": "matt1432",
"repo": "nixos-pacemaker",
"rev": "fe7e11faaa4cc81e1e71c7865520bc7a53329508",
"type": "github"
},
"original": {
"owner": "matt1432",
"repo": "nixos-pacemaker",
"type": "github"
}
},
"pam-fprint-grosshack-src": {
"flake": false,
"locked": {
@ -1103,6 +1085,25 @@
"type": "gitlab"
}
},
"pcsd": {
"inputs": {
"nixpkgs": "nixpkgs_8",
"nixpkgs-pacemaker": "nixpkgs-pacemaker"
},
"locked": {
"lastModified": 1706805944,
"narHash": "sha256-LEDTPr4QJohJGQQKPNyb+hDmPGN3pZBmSkItepStxCs=",
"owner": "matt1432",
"repo": "nixos-pcsd",
"rev": "0b9b8e37c0ad404d0d5bf24333b8df420d16dcf2",
"type": "github"
},
"original": {
"owner": "matt1432",
"repo": "nixos-pcsd",
"type": "github"
}
},
"persist-properties-src": {
"flake": false,
"locked": {
@ -1213,8 +1214,8 @@
"nur": "nur",
"nurl": "nurl",
"nvim-theme-src": "nvim-theme-src",
"pacemaker": "pacemaker",
"pam-fprint-grosshack-src": "pam-fprint-grosshack-src",
"pcsd": "pcsd",
"persist-properties-src": "persist-properties-src",
"plymouth-src": "plymouth-src",
"plymouth-theme-src": "plymouth-theme-src",

View file

@ -141,10 +141,10 @@
};
# Cluster Inputs
pacemaker = {
pcsd = {
type = "github";
owner = "matt1432";
repo = "nixos-pacemaker";
repo = "nixos-pcsd";
# FIXME: OCF resources break on latest
# inputs.nixpkgs.follows = "nixpkgs";