Reorganization
This commit is contained in:
parent
2821a76450
commit
aa3b8519f9
21 changed files with 241 additions and 204 deletions
36
modules/networking/host.nix
Normal file
36
modules/networking/host.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
# Network host configuration with static IP and Avahi discovery
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
publish = {
|
||||
enable = true;
|
||||
userServices = true;
|
||||
addresses = true;
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
nameservers = config.homelab.networking.nameservers;
|
||||
enableIPv6 = false;
|
||||
|
||||
# Avahi port
|
||||
firewall.allowedUDPPorts = [ 5353 ];
|
||||
|
||||
hostName = "homelab";
|
||||
interfaces.${config.homelab.networking.interface} = {
|
||||
ipv4.addresses = [{
|
||||
address = config.homelab.networking.staticIP;
|
||||
prefixLength = 24;
|
||||
}];
|
||||
};
|
||||
|
||||
defaultGateway = {
|
||||
address = config.homelab.networking.gateway;
|
||||
interface = config.homelab.networking.interface;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue