Configuration for my NixOS based systems and Home Manager
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at aleister 75 lines 1.9 kB view raw
1{ ... }: 2{ 3 # networking.hostName = "nixos"; # Define your hostname. 4 # Pick only one of the below networking options. 5 # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. 6 # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. 7 networking.hostName = "odin"; 8 # I like systemd-networkd 9 systemd.network.enable = true; 10 systemd.network.networks."50-wlp2s0" = { 11 matchConfig.name = "wlp2s0"; 12 networkConfig.DHCP = "yes"; 13 linkConfig.RequiredForOnline = "no"; 14 }; 15 16 networking.tempAddresses = "disabled"; 17 18 networking.useNetworkd = true; 19 # TODO: static IP @ 192.168.1.2 20 21 # Configure network proxy if necessary 22 # networking.proxy.default = "http://user:password@proxy:port/"; 23 # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; 24 # Open ports in the firewall. 25 # networking.firewall.allowedTCPPorts = [ ... ]; 26 # networking.firewall.allowedUDPPorts = [ ... ]; 27 # Or disable the firewall altogether. 28 # TODO: allow some ports 29 networking.firewall = { 30 enable = true; 31 allowPing = true; 32 allowedUDPPorts = [ ]; 33 allowedTCPPorts = [ ]; 34 }; 35 36 services.avahi = { 37 enable = true; 38 nssmdns4 = true; 39 nssmdns6 = true; 40 ipv6 = true; 41 openFirewall = true; 42 publish = { 43 enable = true; 44 addresses = true; 45 workstation = true; 46 userServices = true; 47 domain = true; 48 }; 49 }; 50 51 # NFS mounts 52 53 fileSystems = { 54 "/srv/shokuhou" = { 55 device = "192.168.1.3:/srv/shokuhou"; 56 fsType = "nfs"; 57 options = [ 58 "nfsvers=4" 59 "user" 60 "x-system.automount" 61 "x-system.idle-timeout=600" 62 ]; 63 }; 64 "/srv/mentalout" = { 65 device = "192.168.1.3:/srv/mentalout"; 66 fsType = "nfs"; 67 options = [ 68 "nfsvers=4" 69 "user" 70 "x-system.automount" 71 "x-system.idle-timeout=600" 72 ]; 73 }; 74 }; 75}