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
This commit is contained in:
git@71rd.net 2025-12-16 13:33:23 +00:00 committed by Robert Schütz
commit 62ac81aaf9

View file

@ -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.
'';
};