diff --git a/nixos/kyuuto/nfs.nix b/nixos/kyuuto/nfs.nix index d7be9243..5a1d73a3 100644 --- a/nixos/kyuuto/nfs.nix +++ b/nixos/kyuuto/nfs.nix @@ -14,6 +14,7 @@ systems = "${nfsRoot}/kyuuto/systems"; gengetsu = "${nfsRoot.systems}/gengetsu"; mugetsu = "${nfsRoot.systems}/mugetsu"; + goliath = "${nfsRoot.systems}/goliath"; }; in { services.nfs = { @@ -82,6 +83,24 @@ in { }; }; }; + "${nfsRoot.goliath}/root" = { + flags = flagSets.common ++ ["fsid=172"] ++ ["async"]; + clients = { + goliath = { + machine = flagSets.goliathClients; + flags = flagSets.metal; + }; + }; + }; + "${nfsRoot.goliath}/boot" = { + flags = flagSets.common ++ ["fsid=173"] ++ ["async"]; + clients = { + goliath = { + machine = flagSets.goliathClients; + flags = flagSets.metal; + }; + }; + }; }; }; }; @@ -130,5 +149,15 @@ in { what = "${kyuuto.dataDir}/systems/mugetsu/fs/boot"; where = "${nfsRoot.mugetsu}/boot"; } + { + inherit type options wantedBy before; + what = "${kyuuto.dataDir}/systems/goliath/fs/root"; + where = "${nfsRoot.goliath}/root"; + } + { + inherit type options wantedBy before; + what = "${kyuuto.dataDir}/systems/goliath/fs/boot"; + where = "${nfsRoot.goliath}/boot"; + } ]; } diff --git a/nixos/nfs.nix b/nixos/nfs.nix index 2185c24e..2ed97f7c 100644 --- a/nixos/nfs.nix +++ b/nixos/nfs.nix @@ -66,6 +66,7 @@ in { if addrs != [] then addrs else lib.warn "${name} NFS: falling back to all LAN" cidrForNetwork.allLan.all; in allowed; + mkC4130Client = name: mkMetalClient name ++ mkMetalClient "idrac-${name}"; in { common = [ "no_subtree_check" @@ -103,8 +104,9 @@ in { tailClients = optionals config.services.tailscale.enable cidrForNetwork.tail.all; localClients = cidrForNetwork.allLan.all ++ flagSets.tailClients; allClients = flagSets.clientGroups ++ flagSets.trustedClients ++ flagSets.localClients; - gengetsuClients = mkMetalClient "gengetsu"; - mugetsuClients = mkMetalClient "mugetsu"; + gengetsuClients = mkC4130Client "gengetsu"; + mugetsuClients = mkC4130Client "mugetsu"; + goliathClients = flagSets.gengetsuClients ++ flagSets.mugetsuClients; }; root = { path = "/srv/fs"; diff --git a/systems/reimu/lxc.json b/systems/reimu/lxc.json index a846f81a..9f1b2898 100644 --- a/systems/reimu/lxc.json +++ b/systems/reimu/lxc.json @@ -7,6 +7,9 @@ "/mnt/kyuuto-data/systems/gengetsu/fs/boot mnt/kyuuto-data/systems/gengetsu/fs/boot none bind,optional,create=dir", "/mnt/kyuuto-data/systems/mugetsu/fs/root mnt/kyuuto-data/systems/mugetsu/fs/root none bind,optional,create=dir", "/mnt/kyuuto-data/systems/mugetsu/fs/boot mnt/kyuuto-data/systems/mugetsu/fs/boot none bind,optional,create=dir", + "/mnt/kyuuto-data/systems/goliath mnt/kyuuto-data/systems/goliath none bind,optional,create=dir", + "/mnt/kyuuto-data/systems/goliath/fs/root mnt/kyuuto-data/systems/goliath/fs/root none bind,optional,create=dir", + "/mnt/kyuuto-data/systems/goliath/fs/boot mnt/kyuuto-data/systems/goliath/fs/boot none bind,optional,create=dir", "/dev/net/tun dev/net/tun none bind,optional,create=file" ], "lxc.cgroup2.devices.allow": [ diff --git a/systems/reisen/setup.sh b/systems/reisen/setup.sh index ce6acb8b..1a32f320 100644 --- a/systems/reisen/setup.sh +++ b/systems/reisen/setup.sh @@ -203,7 +203,7 @@ chmod 0775 /mnt/kyuuto-data/minecraft/simplebackups mkkyuuto data/systems 0 0 0775 nfsystemroot=/mnt/kyuuto-data/systems -for nfsystem in gengetsu mugetsu; do +for nfsystem in gengetsu mugetsu goliath; do mkkyuuto data/systems/$nfsystem 0 0 0750 if [[ ! -d $nfsystemroot/$nfsystem/fs ]]; then