41 lines
714 B
Nix
41 lines
714 B
Nix
|
{ config, lib, pkgs, ... }:
|
||
|
|
||
|
{
|
||
|
# Assign a static IP
|
||
|
networking = {
|
||
|
hostName = "aegis";
|
||
|
hostId = "78bb604d";
|
||
|
interfaces.eth0 = {
|
||
|
useDHCP = false;
|
||
|
ipv4.addresses = [{
|
||
|
address = "10.0.1.4";
|
||
|
prefixLength = 24;
|
||
|
}];
|
||
|
};
|
||
|
defaultGateway = {
|
||
|
address = "10.0.1.1";
|
||
|
interface = "eth0";
|
||
|
};
|
||
|
nameservers = [ "1.1.1.1" "8.8.8.8" ];
|
||
|
enableIPv6 = false;
|
||
|
};
|
||
|
|
||
|
# Enable zeroconf
|
||
|
services.avahi = {
|
||
|
enable = true;
|
||
|
nssmdns = true;
|
||
|
publish = {
|
||
|
enable = true;
|
||
|
addresses = true;
|
||
|
domain = true;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
# Firewall configuration
|
||
|
networking.firewall = {
|
||
|
allowedTCPPorts = [ ];
|
||
|
allowedUDPPorts = [ ];
|
||
|
};
|
||
|
|
||
|
}
|