feat(cluster): add network share for files
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
17ecb8975c
commit
ee69aab869
3 changed files with 34 additions and 13 deletions
|
@ -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"];
|
||||
|
||||
|
|
|
@ -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"];
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue