Revert "Assign a static IP address"

This reverts commit 8392ac213b.
This commit is contained in:
coolneng 2022-01-03 10:00:52 +01:00
parent b2bea02dd1
commit b9ed94d3ee
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
2 changed files with 11 additions and 20 deletions

View File

@ -34,6 +34,9 @@
# Cleanup tmp on startup
boot.cleanTmpDir = true;
# Set hostname
networking.hostName = "zion";
# Create coolneng user
users.users.coolneng = {
isNormalUser = true;
@ -53,6 +56,7 @@
services.timesyncd.enable = true;
# Enable ZFS support
networking.hostId = "4e74ea68";
boot.supportedFilesystems = [ "zfs" ];
# Don't import encrypted datasets

View File

@ -1,25 +1,6 @@
{ config, pkgs, lib, ... }:
{
# Assign a static IP
networking = {
hostName = "zion";
hostId = "4e74ea68";
interfaces.eth0 = {
useDHCP = false;
ipv4.addresses = [{
address = "192.168.13.2";
prefixLength = 24;
}];
};
defaultGateway = {
address = "192.168.13.1";
interface = "eth0";
};
nameservers = [ "195.10.195.195" "165.22.224.164" ];
enableIPv6 = false;
};
# Enable zeroconf
services.avahi = {
enable = true;
@ -59,6 +40,12 @@
'';
};
# Disable IPv6
networking.enableIPv6 = false;
# Disable WiFi
networking.interfaces."eth0".useDHCP = true;
# Enable NAT for wireguard
networking.nat = {
enable = true;
@ -90,7 +77,7 @@
# DNS server with ad-block
services.dnsmasq = {
enable = true;
servers = config.networking.nameservers;
servers = [ "195.10.195.195" "165.22.224.164" ];
extraConfig = ''
domain-needed
bogus-priv