mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 16:39:07 +01:00
networking/overlay: Add option fqdn
This commit is contained in:
parent
f27479b861
commit
4a6a391eb0
3 changed files with 6 additions and 4 deletions
|
|
@ -27,6 +27,10 @@ in
|
||||||
type = lib.types.nonEmptyStr;
|
type = lib.types.nonEmptyStr;
|
||||||
default = "";
|
default = "";
|
||||||
};
|
};
|
||||||
|
fqdn = lib.mkOption {
|
||||||
|
type = lib.types.nonEmptyStr;
|
||||||
|
default = "${config.custom.networking.hostName}.${cfg.domain}";
|
||||||
|
};
|
||||||
|
|
||||||
address = lib.mkOption {
|
address = lib.mkOption {
|
||||||
type = lib.types.nonEmptyStr;
|
type = lib.types.nonEmptyStr;
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,7 @@ in
|
||||||
local-zone = "\"${netCfg.overlay.domain}.\" static";
|
local-zone = "\"${netCfg.overlay.domain}.\" static";
|
||||||
local-data =
|
local-data =
|
||||||
let
|
let
|
||||||
nodeRecords =
|
nodeRecords = netCfg.nodes |> lib.map (node: "\"${node.overlay.fqdn}. A ${node.overlay.address}\"");
|
||||||
netCfg.nodes
|
|
||||||
|> lib.map (node: "\"${node.hostName}.${node.overlay.domain}. A ${node.overlay.address}\"");
|
|
||||||
serviceRecords =
|
serviceRecords =
|
||||||
allHosts
|
allHosts
|
||||||
|> lib.attrValues
|
|> lib.attrValues
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
comin.enable = true;
|
comin.enable = true;
|
||||||
alloy = {
|
alloy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
domain = "alloy.${config.networking.hostName}.${config.custom.networking.overlay.domain}";
|
domain = "alloy.${config.custom.networking.overlay.fqdn}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue