better network config
This commit is contained in:
parent
6ce1c0045f
commit
3f0c32302d
14
common.nix
14
common.nix
|
@ -62,20 +62,6 @@ in
|
||||||
# allow all firmware
|
# allow all firmware
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableAllFirmware = true;
|
||||||
|
|
||||||
# use systemd-networkd
|
|
||||||
networking.useDHCP = false;
|
|
||||||
systemd.network.enable = true;
|
|
||||||
systemd.network.networks."10-wan" = {
|
|
||||||
networkConfig = {
|
|
||||||
# start a DHCP Client for IPv4 Addressing/Routing
|
|
||||||
DHCP = "ipv4";
|
|
||||||
# accept Router Advertisements for Stateless IPv6 Autoconfiguraton (SLAAC)
|
|
||||||
IPv6AcceptRA = true;
|
|
||||||
};
|
|
||||||
# make routing on this interface a dependency for network-online.target
|
|
||||||
linkConfig.RequiredForOnline = "routable";
|
|
||||||
};
|
|
||||||
|
|
||||||
# ensure firewall is up, allow ssh and http in
|
# ensure firewall is up, allow ssh and http in
|
||||||
networking.firewall.enable = true;
|
networking.firewall.enable = true;
|
||||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||||
|
|
|
@ -17,8 +17,14 @@
|
||||||
# host name
|
# host name
|
||||||
networking.hostName = "mini";
|
networking.hostName = "mini";
|
||||||
|
|
||||||
# main network interface
|
# main network interface via systemd-networkd
|
||||||
systemd.network.networks."10-wan".matchConfig.Name = "eno1";
|
networking.useDHCP = false;
|
||||||
|
systemd.network.enable = true;
|
||||||
|
systemd.network.networks."10-lan" = {
|
||||||
|
matchConfig.Name = "eno1";
|
||||||
|
networkConfig.DHCP = "yes";
|
||||||
|
linkConfig.RequiredForOnline = "routable";
|
||||||
|
};
|
||||||
|
|
||||||
# amd graphics
|
# amd graphics
|
||||||
hardware.opengl.extraPackages = with pkgs; [ amdvlk rocm-opencl-icd rocm-opencl-runtime ];
|
hardware.opengl.extraPackages = with pkgs; [ amdvlk rocm-opencl-icd rocm-opencl-runtime ];
|
||||||
|
|
|
@ -17,8 +17,14 @@
|
||||||
# host name
|
# host name
|
||||||
networking.hostName = "neko";
|
networking.hostName = "neko";
|
||||||
|
|
||||||
# main network interface
|
# main network interface via systemd-networkd
|
||||||
systemd.network.networks."10-wan".matchConfig.Name = "enp9s0";
|
networking.useDHCP = false;
|
||||||
|
systemd.network.enable = true;
|
||||||
|
systemd.network.networks."10-lan" = {
|
||||||
|
matchConfig.Name = "enp9s0";
|
||||||
|
networkConfig.DHCP = "yes";
|
||||||
|
linkConfig.RequiredForOnline = "routable";
|
||||||
|
};
|
||||||
|
|
||||||
# intel graphics
|
# intel graphics
|
||||||
hardware.opengl.extraPackages = with pkgs; [ intel-media-driver intel-compute-runtime ];
|
hardware.opengl.extraPackages = with pkgs; [ intel-media-driver intel-compute-runtime ];
|
||||||
|
|
Loading…
Reference in a new issue