Files
Olympus/system-config/services/containers/homeassistant/default.nix
2024-11-28 11:09:08 -06:00

27 lines
938 B
Nix

{ config, lib, ... }: {
options.sysconfig.opts.virtualization.homeassistant.enable = lib.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.sysconfig.opts.virtualization.homeassistant.enable {
virtualisation.oci-containers = {
backend = "docker";
containers.homeassistant = {
volumes = [
"/ssd1/Home-Assistant/data:/config"
"/run/dbus:/run/dbus:ro"
];
environment.TZ = "America/Chicago";
image = "ghcr.io/home-assistant/home-assistant:stable"; # Warning: if the tag does not change, the image will not be updated
extraOptions = [
"--network=host"
#"--device=/dev/ttyACM0:/dev/ttyACM0" # Use this for external devices e.g. zigbee
];
};
};
};
}