Skip to content

Commit

Permalink
Install py_mini_racer befora starting HA for my robot vacuum
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalyavolyn committed Nov 28, 2024
1 parent c25687a commit c81b742
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ builtins.listToAttrs (builtins.map
./services/docker.nix
./services/fail2ban.nix
./services/gnome-xrdp.nix
./services/home-assistant.nix
./services/home-assistant
./services/homepage.nix
./services/media-server.nix
./services/minecraft-atm9-tts.nix
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, config, ... }:
{ lib, config, self, ... }:

let
cfg = config.modules.home-assistant;
Expand All @@ -17,13 +17,14 @@ in

config = {
virtualisation.oci-containers.containers."homeassistant" = {
volumes = cfg.volumes ++ lib.optionals cfg.addDbusVolume [ "/run/dbus:/run/dbus:ro" ];
volumes = cfg.volumes ++ lib.optionals cfg.addDbusVolume [ "/run/dbus:/run/dbus:ro" ] ++ [ (builtins.toString ./. + ":/patches") ];
environment.TZ = config.time.timeZone;
image = "ghcr.io/home-assistant/home-assistant:stable";
extraOptions = [
"--network=host"
"--pull=newer"
];
entrypoint ="/patches/start.sh";
};

networking.firewall.allowedTCPPorts = [ 8123 ];
Expand Down
3 changes: 3 additions & 0 deletions modules/services/home-assistant/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

pip install py_mini_racer && exec /init

0 comments on commit c81b742

Please sign in to comment.