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