fix(ct): dns settings

This commit is contained in:
arcnmx 2024-03-30 19:29:14 -07:00
parent 0af904a9f2
commit b5787ec783
4 changed files with 15 additions and 3 deletions

View file

@ -26,7 +26,11 @@
"hostName": "ct", "hostName": "ct",
"networks": { "networks": {
"int": null, "int": null,
"local": null, "local": {
"address4": null,
"address6": null,
"macAddress": null
},
"tail": null "tail": null
} }
} }

View file

@ -38,8 +38,9 @@
mkHostRecordPair = network: system: let mkHostRecordPair = network: system: let
address4 = system.config.network.networks.${network}.address4 or null; address4 = system.config.network.networks.${network}.address4 or null;
address6 = system.config.network.networks.${network}.address6 or null; address6 = system.config.network.networks.${network}.address6 or null;
fqdn = system.config.network.networks.${network}.fqdn or null;
in nameValuePair in nameValuePair
system.config.network.networks.${network}.fqdn or "${network}.${system.config.access.fqdn}" (if fqdn != null then fqdn else "${network}.${system.config.access.fqdn}")
(concatStringsSep "," ( (concatStringsSep "," (
lib.optional (address4 != null) lib.optional (address4 != null)
(toString address4) (toString address4)

View file

@ -7,7 +7,7 @@
... ...
}: let }: let
inherit (lib.modules) mkIf mkBefore mkOrder; inherit (lib.modules) mkIf mkBefore mkOrder;
enableDns = !config.services.dnsmasq.enable && config.networking.hostName != "utsuho" && config.networking.hostName != "ct"; enableDns = !config.services.dnsmasq.enable && config.networking.hostName != "utsuho";
in { in {
imports = let imports = let
inherit (meta) nixos; inherit (meta) nixos;

View file

@ -4,4 +4,11 @@ _: {
modules = [ modules = [
./nixos.nix ./nixos.nix
]; ];
network.networks = {
local = {
fqdn = null;
address4 = null;
address6 = null;
};
};
} }