mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-09 12:05:50 +03:00
nixos/home-assistant: use runCommandLocal for configuration.yaml
It's a quite trivial operation, no need to query substitutors.
This commit is contained in:
parent
dd8f7f3624
commit
d7d1894a36
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ let
|
||||||
# We post-process the result to add support for YAML functions, like secrets or includes, see e.g.
|
# We post-process the result to add support for YAML functions, like secrets or includes, see e.g.
|
||||||
# https://www.home-assistant.io/docs/configuration/secrets/
|
# https://www.home-assistant.io/docs/configuration/secrets/
|
||||||
filteredConfig = lib.converge (lib.filterAttrsRecursive (_: v: ! elem v [ null ])) cfg.config or {};
|
filteredConfig = lib.converge (lib.filterAttrsRecursive (_: v: ! elem v [ null ])) cfg.config or {};
|
||||||
configFile = pkgs.runCommand "configuration.yaml" { preferLocalBuild = true; } ''
|
configFile = pkgs.runCommandLocal "configuration.yaml" { } ''
|
||||||
cp ${format.generate "configuration.yaml" filteredConfig} $out
|
cp ${format.generate "configuration.yaml" filteredConfig} $out
|
||||||
sed -i -e "s/'\!\([a-z_]\+\) \(.*\)'/\!\1 \2/;s/^\!\!/\!/;" $out
|
sed -i -e "s/'\!\([a-z_]\+\) \(.*\)'/\!\1 \2/;s/^\!\!/\!/;" $out
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue