From 62ac81aaf9afc9080b52b3a1f177cfef6e98d8b6 Mon Sep 17 00:00:00 2001 From: "git@71rd.net" Date: Tue, 16 Dec 2025 13:33:23 +0000 Subject: [PATCH] nixos/home-assistant: do not set server_host by default Allowing `services.home-assistant.config.http.server_host` to be set to `null` and making this default. Setting the value to null leads to it not being set in the by formats.ya This should not change the default behaviour of home-assistant, as by default the process binds to all available addresses. This change avoids creating a warning in home-assistant about the deprecation of the server_host option and expected removal in 2026.06 An open issue for upstream around the removal can be found here: https://github.com/home-assistant/core/issues/157961 --- .../services/home-automation/home-assistant.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/nixos/modules/services/home-automation/home-assistant.nix b/nixos/modules/services/home-automation/home-assistant.nix index dc1900f52c1e..315f536a8039 100644 --- a/nixos/modules/services/home-automation/home-assistant.nix +++ b/nixos/modules/services/home-automation/home-assistant.nix @@ -406,14 +406,15 @@ in http = { # https://www.home-assistant.io/integrations/http/ server_host = mkOption { - type = types.either types.str (types.listOf types.str); - default = [ - "0.0.0.0" - "::" + type = types.nullOr (types.either types.str (types.listOf types.str)); + default = null; + example = [ + "::1" + "127.0.0.1" ]; - example = "::1"; description = '' - Only listen to incoming requests on specific IP/host. The default listed assumes support for IPv4 and IPv6. + Only listen to incoming requests on specific IP/host. + The option is unset by default, meaning that Home Assistant listens on all available addresses. ''; };