From a1e0d27c177328bddb815144d80775e55d50c5f1 Mon Sep 17 00:00:00 2001 From: Filippo Berto Date: Mon, 6 Dec 2021 20:34:50 +0100 Subject: [PATCH] Add home assitant to loki --- nixos/loki.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/nixos/loki.nix b/nixos/loki.nix index cb80a19..4fbb300 100644 --- a/nixos/loki.nix +++ b/nixos/loki.nix @@ -208,6 +208,7 @@ 445 # SAMBA 139 # SAMBA 5357 # SAMBA-WSDD + 8123 # HOME ASSISTANT 8384 # SYNCTHING 8385 # SYNCTHING ]; @@ -225,6 +226,21 @@ libvirtd.enable = true; podman.enable = true; virtualbox.host.enable = true; + + oci-containers.containers = { + hass = { + image = "ghcr.io/home-assistant/home-assistant:stable"; + environment = { + TZ = "Europe/Rome"; + }; + extraOptions = [ "--privileged" "--network=host" ]; + ports = [ "8123:8123" ]; + volumes = [ + "/var/lib/hass:/config" + "/mnt/raid/condiviso:/media" + ]; + }; + }; }; environment.systemPackages = with pkgs; [ htop kakoune vim tmux ]; @@ -240,5 +256,5 @@ "experimental-features = nix-command flakes"; gc.automatic = true; }; - system.stateVersion = "21.05"; + system.stateVersion = "21.11"; }