Initial setup
This commit is contained in:
commit
ac3f55966b
9 changed files with 285 additions and 0 deletions
37
networking/host.nix
Normal file
37
networking/host.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ config, lib, pkgs, ... }: {
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
publish = {
|
||||
enable = true;
|
||||
userServices = true;
|
||||
addresses = true;
|
||||
};
|
||||
};
|
||||
|
||||
# DNS server
|
||||
services.resolved.enable = true;
|
||||
|
||||
networking = {
|
||||
nameservers = [ "205.171.3.25" "8.8.8.8" ];
|
||||
|
||||
enableIPv6 = false;
|
||||
|
||||
# Avahi port
|
||||
firewall.allowedUDPPorts = [ 5353 ];
|
||||
|
||||
hostName = "homelab";
|
||||
interfaces.enp0s31f6 = {
|
||||
ipv4.addresses = [{
|
||||
address = "192.168.0.10";
|
||||
prefixLength = 24;
|
||||
}];
|
||||
};
|
||||
|
||||
defaultGateway = {
|
||||
address = "192.168.0.1";
|
||||
interface = "enp0s31f6";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue