home-assistant: simplify definition of configFile
This commit is contained in:
parent
b886faa6b6
commit
e4a6e320bb
|
@ -5,9 +5,10 @@ with lib;
|
||||||
let
|
let
|
||||||
cfg = config.services.home-assistant;
|
cfg = config.services.home-assistant;
|
||||||
|
|
||||||
configFile = pkgs.writeText "configuration.json" (builtins.toJSON (if cfg.applyDefaultConfig
|
# cfg.config != null can be assumed here
|
||||||
then (lib.recursiveUpdate defaultConfig (if (isNull cfg.config) then {} else cfg.config))
|
configFile = pkgs.writeText "configuration.json"
|
||||||
else cfg.config));
|
(builtins.toJSON (if cfg.applyDefaultConfig then
|
||||||
|
(lib.recursiveUpdate defaultConfig cfg.config) else cfg.config));
|
||||||
|
|
||||||
availableComponents = pkgs.home-assistant.availableComponents;
|
availableComponents = pkgs.home-assistant.availableComponents;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue