Files
nix-config/modules/nixos/homeassistant/dashboards/default.nix
mjallen18 70002a19e2 hmm
2026-04-07 18:39:42 -05:00

20 lines
351 B
Nix
Executable File

{
config,
lib,
namespace,
...
}:
let
cfg = config.${namespace}.services.home-assistant;
in
{
imports = [ ./options.nix ];
config = lib.mkIf (cfg.enable && cfg.dashboards != [ ]) {
${namespace}.home.file = lib.genAttrs cfg.dashboards (dashboard: {
text = lib.generators.toYAML { } dashboard;
force = true;
});
};
}