From dba058555534831ab128f99a85c329af5a12c2f3 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Sun, 25 Dec 2022 20:47:21 -0500 Subject: [PATCH] Fix resolved --- modules/linux/default.nix | 2 +- modules/linux/services/resolved.nix | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/linux/default.nix b/modules/linux/default.nix index 91f6ba7..3d3fc1b 100644 --- a/modules/linux/default.nix +++ b/modules/linux/default.nix @@ -37,7 +37,7 @@ in { # Enable resolved resolved = { enable = mkEnableOption "resolved"; - nameservers = mkOption { default = [ "10.0.0.10" ]; }; + nameserver = mkOption { default = "10.0.0.10"; }; domains = mkOption { default = [ "mccarty.io" "stranger.systems" "local" ]; }; diff --git a/modules/linux/services/resolved.nix b/modules/linux/services/resolved.nix index bef1dfb..d260df2 100644 --- a/modules/linux/services/resolved.nix +++ b/modules/linux/services/resolved.nix @@ -5,7 +5,11 @@ with lib; { services.resolved = { enable = true; domains = config.nathan.services.resolved.domains; - fallbackDns = config.nathan.services.resolved.nameservers; + fallbackDns = [ config.nathan.services.resolved.nameserver ]; + extraConfig = '' + [Resolve] + DNS=${config.nathan.services.resolved.nameserver} + ''; }; }; }