diff options
author | Christoph Cullmann <cullmann@kde.org> | 2023-10-24 21:47:13 +0200 |
---|---|---|
committer | Christoph Cullmann <cullmann@kde.org> | 2023-10-24 21:47:13 +0200 |
commit | 6d6f1ee2e898f0b67bedf7c3e55c07fafaa34f9b (patch) | |
tree | feb780d8ec2dd38aa0c2f142748d76d8f34d9bc3 /neko/configuration.nix | |
parent | d26a580ec8889437050765a517d2bbe4d2e66bcb (diff) |
improve network config
Diffstat (limited to 'neko/configuration.nix')
-rw-r--r-- | neko/configuration.nix | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/neko/configuration.nix b/neko/configuration.nix index 42c16e0..3af0537 100644 --- a/neko/configuration.nix +++ b/neko/configuration.nix @@ -14,12 +14,21 @@ /data/nixos/common.nix ]; - # host name - networking.hostName = "neko"; - - # main network interface - systemd.network.networks."10-wan".matchConfig.Name = "enp10s0"; - # intel graphics hardware.opengl.extraPackages = with pkgs; [ intel-media-driver intel-compute-runtime ]; + + # use systemd-networkd, fixed IPv4, dynamic IPv6 + networking.hostName = "neko"; + networking.useDHCP = false; + networking.nameservers = [ "192.168.13.1" ]; + systemd.network = { + enable = true; + networks."10-wan" = { + matchConfig.Name = "enp10s0"; + address = [ "192.168.13.171/24" ]; + routes = [ { routeConfig.Gateway = "192.168.13.1"; } ]; + networkConfig.IPv6AcceptRA = true; + linkConfig.RequiredForOnline = "routable"; + }; + }; } |