2024-09-08 19:22:14 -05:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2024-09-12 20:50:53 -05:00
|
|
|
with lib; let
|
2024-10-06 10:16:52 -05:00
|
|
|
cfg = config.custom.containers.homeassistant;
|
2024-09-12 20:50:53 -05:00
|
|
|
in {
|
2024-10-06 10:16:52 -05:00
|
|
|
options.custom.containers.homeassistant.enable = mkOption {default = false;};
|
2024-09-08 19:22:14 -05:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
#?? arion-homeassistant pull
|
|
|
|
environment.shellAliases.arion-homeassistant = "sudo arion --prebuilt-file ${config.virtualisation.arion.projects.homeassistant.settings.out.dockerComposeYaml}";
|
|
|
|
|
2024-10-08 18:23:50 -05:00
|
|
|
virtualisation.arion.projects.homeassistant.settings.services = {
|
|
|
|
homeassistant.service = {
|
|
|
|
container_name = "homeassistant";
|
2025-01-17 16:39:57 -06:00
|
|
|
image = "homeassistant/home-assistant:2025.1";
|
2024-10-08 18:23:50 -05:00
|
|
|
ports = ["8123:8123"];
|
|
|
|
restart = "unless-stopped";
|
|
|
|
volumes = ["${config.custom.containers.directory}/homeassistant/config:/config"];
|
2024-09-08 19:22:14 -05:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|