try ha container
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
./utils/modules/sops.nix
|
||||
./utils/modules/lego/lego.nix
|
||||
./utils/modules/nginx.nix
|
||||
./utils/modules/home-assistant/default.nix
|
||||
./utils/modules/home-assistant/new.nix
|
||||
./utils/modules/mopidy.nix
|
||||
./utils/modules/mosquitto.nix
|
||||
./utils/modules/snapserver.nix
|
||||
|
||||
31
utils/modules/home-assistant/new.nix
Normal file
31
utils/modules/home-assistant/new.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{}:
|
||||
{
|
||||
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"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user