initial commit for module-refactor
This commit is contained in:
@@ -1,20 +1,24 @@
|
||||
{host, ...}: let
|
||||
{host, lib, config, ...}: let
|
||||
desktop = host == "oganesson";
|
||||
in {
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
hostName =
|
||||
if desktop
|
||||
then "oganesson"
|
||||
else "mercury";
|
||||
hosts = {
|
||||
"192.168.1.201" = ["glasshaus"];
|
||||
"192.168.1.111" = ["argon"];
|
||||
"192.168.1.223" = ["mercury"];
|
||||
};
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [30000];
|
||||
options = {
|
||||
networkModule.enable = lib.mkEnableOption "enables network configuration";
|
||||
};
|
||||
config = lib.mkIf config.networkModule.enable {
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
hostName =
|
||||
if desktop
|
||||
then "oganesson"
|
||||
else "mercury";
|
||||
hosts = {
|
||||
"192.168.1.201" = ["xenon"];
|
||||
"192.168.1.111" = ["argon"];
|
||||
"192.168.1.223" = ["mercury"];
|
||||
};
|
||||
firewall = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user