Ok, distributed. Maybe.
This commit is contained in:
parent
4e145a70d9
commit
9191593dc7
9 changed files with 76 additions and 47 deletions
|
@ -1,6 +1,7 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./hosts
|
||||
./mounts
|
||||
./mycelium
|
||||
./nameservers
|
||||
|
|
10
modules/system/devices/networking/hosts/default.nix
Normal file
10
modules/system/devices/networking/hosts/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ config, lib, nodes, ... }:
|
||||
{
|
||||
networking.hosts = with nodes; {
|
||||
"${midas.config.deployment.targetHost}" = [ "midas" ];
|
||||
"${kitty.config.deployment.targetHost}" = [ "kitty" ];
|
||||
"${detritus.config.deployment.targetHost}" = [ "detritus" ];
|
||||
"${elder.config.deployment.targetHost}" = [ "elder" ];
|
||||
"${prophet.config.deployment.targetHost}" = [ "prophet" ];
|
||||
};
|
||||
}
|
|
@ -1,41 +1,34 @@
|
|||
{ config, lib, nodes, ... }:
|
||||
{
|
||||
fileSystems = let
|
||||
netOpts = [
|
||||
"noauto"
|
||||
"soft"
|
||||
"x-systemd.automount"
|
||||
];
|
||||
common = {
|
||||
fsType = "nfs4";
|
||||
options = [
|
||||
"noauto"
|
||||
"soft"
|
||||
"x-systemd.automount"
|
||||
];
|
||||
};
|
||||
in with nodes; {
|
||||
"midas" = {
|
||||
device = "[${midas.config.deployment.targetHost}]:/storage";
|
||||
"midas" = common // {
|
||||
device = "midas:/storage";
|
||||
mountPoint = "/network/Midas";
|
||||
fsType = "nfs4";
|
||||
options = netOpts;
|
||||
};
|
||||
"kitty" = {
|
||||
device = "[${kitty.config.deployment.targetHost}]:/storage";
|
||||
"kitty" = common // {
|
||||
device = "kitty:/storage";
|
||||
mountPoint = "/network/Kitty";
|
||||
fsType = "nfs4";
|
||||
options = netOpts;
|
||||
};
|
||||
"detritus" = {
|
||||
device = "[${detritus.config.deployment.targetHost}]:/storage";
|
||||
"detritus" = common // {
|
||||
device = "detritus:/storage";
|
||||
mountPoint = "/network/Detritus";
|
||||
fsType = "nfs4";
|
||||
options = netOpts;
|
||||
};
|
||||
"elder" = {
|
||||
device = "[${elder.config.deployment.targetHost}]:/storage";
|
||||
"elder" = common // {
|
||||
device = "elder:/storage";
|
||||
mountPoint = "/network/Elder";
|
||||
fsType = "nfs4";
|
||||
options = netOpts;
|
||||
};
|
||||
"prophet" = {
|
||||
device = "[${prophet.config.deployment.targetHost}]:/storage";
|
||||
"prophet" = common // {
|
||||
device = "prophet:/storage";
|
||||
mountPoint = "/network/Prophet";
|
||||
fsType = "nfs4";
|
||||
options = netOpts;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue