From 661ebb36d6b2acab2de4553178e8b474cc5a1b00 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 22 Apr 2018 13:41:27 +0200 Subject: dhcp4 --- bragi.nix | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) (limited to 'bragi.nix') diff --git a/bragi.nix b/bragi.nix index 2e66e504..afa96e5b 100644 --- a/bragi.nix +++ b/bragi.nix @@ -67,6 +67,15 @@ in rec { useSTARTTLS = true; setSendmail = true; }; + + dhcpcd = { + enable = true; + extraConfig = '' + interface wlp4s0 + ipv6rs + ia_pd 1/::/64 eth/0/64 + ''; + }; }; services.radvd = { @@ -102,12 +111,24 @@ in rec { ''; }; - services.dhcpcd = { + services.dhcpd4 = { enable = true; + interfaces = [ "eth" + ]; + + machines = [ + { ethernetAddress = "e0:cb:4e:f7:10:3d"; hostName = "vali"; ipAddress = "vali.bragisheimr.yggdrasil"; } + ]; + extraConfig = '' - interface wlp4s0 - ipv6rs - ia_pd 1/::/64 eth/0/64 + option subnet-mask 255.255.225.0 + option domain-name-servers 10.141.1.1, 8.8.8.8, 8.8.4.4; + option domain-name "bragisheimr.yggdrasil"; + option routers 10.141.4.1; + + subnet 10.141.4.0 netmask 255.255.255.0 { + range 10.141.4.128 10.141.4.254; + } ''; }; -- cgit v1.2.3