summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/router.nix18
-rw-r--r--machines/tiny1.nix1
2 files changed, 11 insertions, 8 deletions
diff --git a/config/router.nix b/config/router.nix
index a0dc160..98a37fd 100644
--- a/config/router.nix
+++ b/config/router.nix
@@ -10,6 +10,8 @@ in {
services.tftpd.enable = true;
services.openntpd.enable = true;
+ networking.useDHCP = false;
+
networking.networkmanager.enable = lib.mkForce false;
networking.nameservers = [ "8.8.8.8" ];
@@ -32,7 +34,7 @@ in {
systemd.services.update-dynamic-dns = {
description = "Update dynamic dns records";
- path = with pkgs; [ bash dnsutils nettools gawk iproute ];
+ path = with pkgs; [ bash dnsutils nettools gawk iproute curl ];
startLimitIntervalSec = 5;
script = toString ../tools/update-dns.sh;
};
@@ -197,11 +199,14 @@ in {
# ia_pd 1/::/64 ${lan-dev}.100/0/64
'';
};
- systemd.services.dhcpcd.preStart = lib.mkAfter ''
- ${pkgs.iproute}/bin/ip link set dev ${wan-dev} address ${
- config.networking.interfaces.${wan-dev}.macAddress
- };
- '';
+ systemd.services.dhcpcd = {
+ after = [ "network-addresses-${wan-dev}.service" ];
+ preStart = lib.mkAfter ''
+ ${pkgs.iproute}/bin/ip link set dev ${wan-dev} address ${
+ config.networking.interfaces.${wan-dev}.macAddress
+ };
+ '';
+ };
services.dnsmasq = {
enable = true;
@@ -221,7 +226,6 @@ in {
networking.sits.he0 = {
dev = wan-dev;
- local = "74.73.86.185";
remote = "209.51.161.14";
};
diff --git a/machines/tiny1.nix b/machines/tiny1.nix
index e4bc525..66a2c2a 100644
--- a/machines/tiny1.nix
+++ b/machines/tiny1.nix
@@ -11,7 +11,6 @@
networking.hostName = "tiny1";
- networking.useDHCP = false;
networking.interfaces.ens3.useDHCP = true;
services.openssh.enable = true;