Files
nix-config/modules/nixos/homeassistant/dashboards/default.nix
2026-03-25 16:42:34 -05:00

20 lines
351 B
Nix

{
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;
});
};
}