32 lines
1.0 KiB
Nix
32 lines
1.0 KiB
Nix
{ ... }: {
|
|
{
|
|
virtualisation = {
|
|
podman = {
|
|
enable = true;
|
|
|
|
# Create a `docker` alias for podman, to use it as a drop-in replacement
|
|
dockerCompat = true;
|
|
|
|
# Required for containers under podman-compose to be able to talk to each other.
|
|
defaultNetwork.settings.dns_enabled = true;
|
|
# For Nixos version > 22.11
|
|
#defaultNetwork.settings = {
|
|
# dns_enabled = true;
|
|
#};
|
|
};
|
|
};
|
|
virtualisation.oci-containers = {
|
|
backend = "podman";
|
|
containers.homeassistant = {
|
|
volumes = [ "home-assistant:/config" ];
|
|
environment.TZ = "Europe/Vienna";
|
|
image = "ghcr.io/home-assistant/home-assistant:sha256:17667d8849f01fb8a34f2eecff79beb50be0394928c8c4b64853648472ebee38"; # Warning: if the tag does not change, the image will not be updated
|
|
extraOptions = [
|
|
"--network=host"
|
|
"--device=/dev/serial/by-id/usb-EnOcean_GmbH_EnOcean_USB_300_DC_FT5OI9YG-if00-port0:/dev/serial/by-id/usb-EnOcean_GmbH_EnOcean_USB_300_DC_FT5OI9YG-if00-port0"
|
|
];
|
|
};
|
|
};
|
|
}
|
|
|