{ ... }: { # networking.hostName = "nixos"; # Define your hostname. # Pick only one of the below networking options. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. networking.hostName = "othinus"; # I like systemd-networkd systemd.network.enable = true; systemd.network.networks."50-wlp2s0" = { matchConfig.name = "wlp2s0"; networkConfig.DHCP = "yes"; linkConfig.RequiredForOnline = "no"; }; networking.interfaces = { enp4s0f1 = { ipv4.addresses = [{ address = "192.168.1.4"; prefixLength = 24; }]; }; }; networking.defaultGateway = { address = "192.168.1.1"; interface = "enp4s0f1"; }; networking.nameservers = [ "192.168.1.3" "192.168.1.5" "45.90.28.93" "45.90.30.93" ]; # This is necessary for ZFX networking.hostId = "0d14fe47"; networking.useNetworkd = true; # TODO: static IP @ 192.168.1.2 # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; # Or disable the firewall altogether. # TODO: allow some ports networking.firewall = { enable = true; allowPing = true; allowedTCPPorts = [ # iperf3 5201 ]; }; services.avahi = { enable = true; nssmdns = true; openFirewall = true; publish = { enable = true; addresses = true; workstation = true; }; }; }