feat(cluster): add network share for files
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-01-23 16:15:40 -05:00
parent 17ecb8975c
commit ee69aab869
3 changed files with 34 additions and 13 deletions

View file

@ -10,6 +10,8 @@
caddy = caddy-plugins.packages.${pkgs.system}.default;
in {
imports = [caddy-plugins.nixosModules.default];
# User stuff
environment.systemPackages = [caddy];
users.users.${mainUser}.extraGroups = ["caddy"];

View file

@ -1,4 +1,4 @@
{...}: {
{pkgs, ...}: {
imports = [
./options.nix
../corosync.nix
@ -7,7 +7,8 @@
];
# TODO: update script
services.pacemaker = {
services = {
pacemaker = {
enable = true;
resources = {
@ -23,4 +24,21 @@
};
};
};
rpcbind.enable = true; # needed for NFS
};
environment.systemPackages = with pkgs; [nfs-utils];
systemd.mounts = [
{
type = "nfs";
mountConfig = {
Options = "noatime";
};
what = "servivi:/caddy";
where = "/var/lib/caddy";
requiredBy = ["caddy.service"];
}
];
}

View file

@ -204,6 +204,7 @@ in {
script = ''
# The config needs to be installed from one node only
# TODO: add assertion, corosync must be enabled with at least one node
if [ "$(uname -n)" = ${host1} ]; then
# TODO: setup stonith / fencing
crm_attribute --type crm_config --name stonith-enabled --update false