nixos/home-assistant: use `preferLocalBuild = true` for configuration

This commit is contained in:
Robert Schütz 2019-02-27 22:43:39 +01:00
parent 971187eada
commit 77482629b0
1 changed files with 2 additions and 2 deletions

View File

@ -9,13 +9,13 @@ let
configJSON = pkgs.writeText "configuration.json" configJSON = pkgs.writeText "configuration.json"
(builtins.toJSON (if cfg.applyDefaultConfig then (builtins.toJSON (if cfg.applyDefaultConfig then
(recursiveUpdate defaultConfig cfg.config) else cfg.config)); (recursiveUpdate defaultConfig cfg.config) else cfg.config));
configFile = pkgs.runCommand "configuration.yaml" { } '' configFile = pkgs.runCommand "configuration.yaml" { preferLocalBuild = true; } ''
${pkgs.remarshal}/bin/json2yaml -i ${configJSON} -o $out ${pkgs.remarshal}/bin/json2yaml -i ${configJSON} -o $out
''; '';
lovelaceConfigJSON = pkgs.writeText "ui-lovelace.json" lovelaceConfigJSON = pkgs.writeText "ui-lovelace.json"
(builtins.toJSON cfg.lovelaceConfig); (builtins.toJSON cfg.lovelaceConfig);
lovelaceConfigFile = pkgs.runCommand "ui-lovelace.yaml" { } '' lovelaceConfigFile = pkgs.runCommand "ui-lovelace.yaml" { preferLocalBuild = true; } ''
${pkgs.remarshal}/bin/json2yaml -i ${lovelaceConfigJSON} -o $out ${pkgs.remarshal}/bin/json2yaml -i ${lovelaceConfigJSON} -o $out
''; '';