mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
fix: local resolution
This commit is contained in:
parent
500134de8b
commit
5c93db721a
3 changed files with 6 additions and 2 deletions
|
|
@ -16,7 +16,7 @@ in {
|
|||
|
||||
config.networking.access = {
|
||||
hostnameForNetwork = {
|
||||
local = mkIf config.services.avahi.enable "${hostName}.local";
|
||||
local = mkIf config.services.avahi.enable "${hostName}.local.cutie.moe";
|
||||
tail = mkIf config.services.tailscale.enable "${hostName}.tail.cutie.moe";
|
||||
global = mkIf config.networking.enableIPv6 "${hostName}.cutie.moe";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
inherit (lib.modules) mkIf mkMerge mkBefore mkDefault;
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.lists) optional elem;
|
||||
inherit (lib.strings) toLower;
|
||||
in {
|
||||
options.services.home-assistant = with lib.types; {
|
||||
mutableUiConfig = mkEnableOption "UI-editable config files";
|
||||
|
|
@ -51,7 +52,9 @@ in {
|
|||
# MDNS
|
||||
services.avahi = mkIf (cfg.enable && cfg.homekit.enable) {
|
||||
enable = mkDefault true;
|
||||
publish.enable = false;
|
||||
publish.enable = let
|
||||
homekitNames = map (homekit: toLower homekit.name) cfg.config.homekit or [ ];
|
||||
in mkIf (elem config.networking.hostName homekitNames) false;
|
||||
};
|
||||
|
||||
systemd.services.home-assistant = mkIf (cfg.enable && cfg.mutableUiConfig) {
|
||||
|
|
|
|||
|
|
@ -218,6 +218,7 @@ in {
|
|||
DNSDefaultRoute = true;
|
||||
MulticastDNS = true;
|
||||
};
|
||||
linkConfig.Multicast = true;
|
||||
};
|
||||
links.eno1 = {
|
||||
matchConfig = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue