summaryrefslogtreecommitdiff
path: root/mini
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2023-10-24 21:47:13 +0200
committerChristoph Cullmann <cullmann@kde.org>2023-10-24 21:47:13 +0200
commit6d6f1ee2e898f0b67bedf7c3e55c07fafaa34f9b (patch)
treefeb780d8ec2dd38aa0c2f142748d76d8f34d9bc3 /mini
parentd26a580ec8889437050765a517d2bbe4d2e66bcb (diff)
improve network config
Diffstat (limited to 'mini')
-rw-r--r--mini/configuration.nix21
1 files changed, 15 insertions, 6 deletions
diff --git a/mini/configuration.nix b/mini/configuration.nix
index a3899a8..5210fdd 100644
--- a/mini/configuration.nix
+++ b/mini/configuration.nix
@@ -14,12 +14,21 @@
/data/nixos/common.nix
];
- # host name
- networking.hostName = "mini";
-
- # main network interface
- systemd.network.networks."10-wan".matchConfig.Name = "eno1";
-
# amd graphics
hardware.opengl.extraPackages = with pkgs; [ amdvlk rocm-opencl-icd rocm-opencl-runtime ];
+
+ # use systemd-networkd, fixed IPv4, dynamic IPv6
+ networking.hostName = "mini";
+ networking.useDHCP = false;
+ networking.nameservers = [ "192.168.13.1" ];
+ systemd.network = {
+ enable = true;
+ networks."10-wan" = {
+ matchConfig.Name = "eno1";
+ address = [ "192.168.13.100/24" ];
+ routes = [ { routeConfig.Gateway = "192.168.13.1"; } ];
+ networkConfig.IPv6AcceptRA = true;
+ linkConfig.RequiredForOnline = "routable";
+ };
+ };
}