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.
This commit is contained in:
parent
112cc9c052
commit
ee2ea82a68
1 changed files with 14 additions and 1 deletions
|
@ -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…
Reference in a new issue