nixos/home-assistant: make config deep mergeable

This make it possible to split the home-assistant configuration
across multiple files and nix will merge the option in an intuitive
way.
wip/yesman
Jörg Thalheim 4 years ago
parent 112cc9c052
commit ee2ea82a68
No known key found for this signature in database
GPG Key ID: 003F2096411B5F92
  1. 15
      nixos/modules/services/misc/home-assistant.nix

@ -96,7 +96,20 @@ in {
config = mkOption {
default = null;
type = with types; nullOr attrs;
# Migrate to new option types later: https://github.com/NixOS/nixpkgs/pull/75584
type = with lib.types; let
valueType = nullOr (oneOf [
bool
int
float
str
(lazyAttrsOf valueType)
(listOf valueType)
]) // {
description = "Yaml value";
emptyValue.value = {};
};
in valueType;
example = literalExample ''
{
homeassistant = {

Loading…
Cancel
Save