faster boot

This commit is contained in:
soraefir
2026-06-12 00:01:44 +02:00
parent c6d017698f
commit 526a36b6e6
3 changed files with 24 additions and 2 deletions

View File

@@ -3,6 +3,10 @@
hostName = config.syscfg.hostname;
useDHCP = true;
nameservers = [ "1.1.1.1" "9.9.9.9" ];
dhcpcd = {
enable = true;
wait = "background";
};
extraHosts = ''
${lib.concatStringsSep "\n" config.syscfg.extra.hosts}

View File

@@ -27,6 +27,7 @@ in
else
[{
allowedIPs = [ "10.10.1.0/24" "fd10:10:10::0/64" ];
name = "vpn-helcel";
endpoint = "vpn.helcel.net:1515";
publicKey = "NFBJvYXZC+bd62jhrKnM7/pugidWhgR6+C5qIiUiq3Q=";
persistentKeepalive = 30;
@@ -34,9 +35,17 @@ in
};
};
};
systemd.services."wireguard-wg0" = {
systemd.services."wireguard-wg0-peer-vpn-helcel" = {
after = [ "network-online.target" "nss-lookup.target" ];
wants = [ "network-online.target" "nss-lookup.target" ];
bindsTo = [ "network-online.target" ];
wantedBy = lib.mkForce [ "network-online.target" ];
before = lib.mkForce [ ];
serviceConfig = {
Restart = "on-failure";
RestartSec = "10s"; # Wait 2 seconds before retrying the domain query
};
startLimitIntervalSec = 0;
};
};
}