Fix resolvconf BS
1 files changed, 21 insertions, 8 deletions
diff --git a/modules/base.nix b/modules/base.nix
index 4cf2aff..2f565e4 100755
--- a/modules/base.nix
+++ b/modules/base.nix
@@ -1,4 +1,9 @@
-{ pkgs, lib, ... }:
+{
+ pkgs,
+ lib,
+ config,
+ ...
+}:
{
imports = [
@@ -6,6 +11,8 @@
./users/Rory.nix
./extra-substituters.nix
./monitoring/module.nix
+
+ ./packages/overlays/openvpn.nix # Temporary: Fix a build failure
];
boot = {
@@ -60,19 +67,25 @@
# allowedTCPPorts = [ ... ];
# allowedUDPPorts = [ ... ];
};
- nameservers = [
+ nameservers = lib.mkDefault [
"1.1.1.1"
"1.0.0.1"
"8.8.8.8"
"8.4.4.8"
];
};
- environment.etc."resolv.conf".text = ''
- nameserver 8.8.8.8
- nameserver 8.4.4.8
- nameserver 1.1.1.1
- nameserver 1.0.0.1
- '';
+
+ environment.etc."resolv.conf" = lib.mkDefault {
+ text = lib.concatStringsSep "\n" (
+ lib.optionals (config.networking ? nameservers) (map (nameserver: "nameserver ${nameserver}") (config.networking.nameservers))
+ ++ lib.optionals (config.networking ? enableIPv6 && !config.networking.enableIPv6) [ "options no-aaaa" ]
+ ++ lib.optionals (config.networking ? enableIPv6 && config.networking.enableIPv6) [
+ "options single-request"
+ "options single-request-reopen"
+ "options inet6"
+ ]
+ );
+ };
i18n.defaultLocale = "en_US.UTF-8";
|