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

View file

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

View file

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

View file

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

View file

@ -948,6 +948,7 @@
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "612f97239e2cc474c13c9dafa0df378058c5ad8d",
"type": "github" "type": "github"
} }
}, },
@ -1068,25 +1069,6 @@
"type": "github" "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": { "pam-fprint-grosshack-src": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -1103,6 +1085,25 @@
"type": "gitlab" "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": { "persist-properties-src": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -1213,8 +1214,8 @@
"nur": "nur", "nur": "nur",
"nurl": "nurl", "nurl": "nurl",
"nvim-theme-src": "nvim-theme-src", "nvim-theme-src": "nvim-theme-src",
"pacemaker": "pacemaker",
"pam-fprint-grosshack-src": "pam-fprint-grosshack-src", "pam-fprint-grosshack-src": "pam-fprint-grosshack-src",
"pcsd": "pcsd",
"persist-properties-src": "persist-properties-src", "persist-properties-src": "persist-properties-src",
"plymouth-src": "plymouth-src", "plymouth-src": "plymouth-src",
"plymouth-theme-src": "plymouth-theme-src", "plymouth-theme-src": "plymouth-theme-src",

View file

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