mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-22 04:57:56 +03:00
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
@ -96,7 +96,20 @@ in {
|
|||||||
|
|
||||||
config = mkOption {
|
config = mkOption {
|
||||||
default = null;
|
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 ''
|
example = literalExample ''
|
||||||
{
|
{
|
||||||
homeassistant = {
|
homeassistant = {
|
||||||
|
Loading…
Reference in New Issue
Block a user