Fix dnsmasq

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-03-11 12:36:25 +00:00
parent 9c22042983
commit e4ff6f13b1
4 changed files with 20 additions and 30 deletions

View File

@@ -1,21 +1,22 @@
{ ... }:
{ lib, pkgs, ... }:
{
services.dnsmasq = {
enable = true;
networking.networkmanager.dns = "dnsmasq";
settings = {
environment.etc."NetworkManager/dnsmasq.d/10-bind-interfaces.conf".source =
(pkgs.formats.keyValue {
mkKeyValue =
name: value:
if value == true then
name
else if value == false then
""
else
lib.generators.mkKeyValueDefault { } "=" name value;
listsAsDuplicateKeys = true;
}).generate
"10-bind-interfaces.conf"
{
bind-interfaces = true;
listen-address = [ "127.0.0.1" ];
conf-dir = "/etc/dnsmasq.d,*.conf";
server = [
"1.1.1.1"
"1.0.0.1"
];
};
};
systemd.tmpfiles.rules = [ "d /etc/dnsmasq.d 0755 root resolvconf" ];
networking.networkmanager.dns = "dnsmasq";
}

View File

@@ -18,7 +18,7 @@
};
systemd.services = {
libvirtd.after = lib.mkIf config.services.dnsmasq.enable [ "dnsmasq.service" ];
libvirtd.after = [ "NetworkManager.service" ];
libvirtd-network-default = {
description = "Start Default Virtual Network for Libvirt";

View File

@@ -1,10 +0,0 @@
{ ... }:
{
specialisation.sas.configuration.services.dnsmasq.settings.server = [
"1.1.1.1"
"1.0.0.1"
# SAS Guest DNS
"208.67.220.220"
"208.67.222.222"
];
}

View File

@@ -47,7 +47,6 @@
../common/configs/system/users
../common/configs/system/zsh
./configs/dnsmasq
./configs/git
./configs/vpn