@@ -1,21 +1,22 @@
|
|||||||
{ ... }:
|
{ lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
services.dnsmasq = {
|
networking.networkmanager.dns = "dnsmasq";
|
||||||
enable = true;
|
|
||||||
|
|
||||||
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;
|
bind-interfaces = true;
|
||||||
listen-address = [ "127.0.0.1" ];
|
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";
|
|
||||||
}
|
}
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
systemd.services = {
|
systemd.services = {
|
||||||
libvirtd.after = lib.mkIf config.services.dnsmasq.enable [ "dnsmasq.service" ];
|
libvirtd.after = [ "NetworkManager.service" ];
|
||||||
|
|
||||||
libvirtd-network-default = {
|
libvirtd-network-default = {
|
||||||
description = "Start Default Virtual Network for Libvirt";
|
description = "Start Default Virtual Network for Libvirt";
|
||||||
|
@@ -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"
|
|
||||||
];
|
|
||||||
}
|
|
@@ -47,7 +47,6 @@
|
|||||||
../common/configs/system/users
|
../common/configs/system/users
|
||||||
../common/configs/system/zsh
|
../common/configs/system/zsh
|
||||||
|
|
||||||
./configs/dnsmasq
|
|
||||||
./configs/git
|
./configs/git
|
||||||
./configs/vpn
|
./configs/vpn
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user