diff options
| author | Alejandro Soto <alejandro@34project.org> | 2024-07-14 21:32:12 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2024-07-15 09:34:02 -0600 |
| commit | 77c96b723b24192c4be6cc6e112f0216e79a7383 (patch) | |
| tree | 5ecd12d1cf374da53de116e3be798492ad0b3bf1 /sys | |
| parent | 02abf4ed0131237c25e0a10db50fa4c41a902a50 (diff) | |
sys/home-assistant: initial commit
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/default.nix | 1 | ||||
| -rw-r--r-- | sys/home-assistant/default.nix | 36 |
2 files changed, 37 insertions, 0 deletions
diff --git a/sys/default.nix b/sys/default.nix index 969739a..41eb882 100644 --- a/sys/default.nix +++ b/sys/default.nix @@ -13,6 +13,7 @@ with lib; { ./env ./gitea ./hardware + ./home-assistant ./kiosk ./mail ./mta diff --git a/sys/home-assistant/default.nix b/sys/home-assistant/default.nix new file mode 100644 index 0000000..23b9160 --- /dev/null +++ b/sys/home-assistant/default.nix @@ -0,0 +1,36 @@ +{ config, lib, pkgs, ... }: +with lib; let + cfg = config.local.home-assistant; +in +{ + options.local.home-assistant = { + enable = mkEnableOption "home-assistant"; + }; + + config = mkIf cfg.enable { + local.boot.impermanence.directories = [ + { directory = "/var/lib/hass"; user = "hass"; group = "hass"; mode = "u=rwx,g=,o="; } + ]; + + services.home-assistant = { + enable = true; + + extraComponents = [ + "met" + "google_translate" + "radio_browser" + "xiaomi_miio" + ]; + + config = { + # Includes dependencies for a basic setup + # https://www.home-assistant.io/integrations/default_config/ + default_config = { }; + }; + + customComponents = with pkgs.home-assistant-custom-components; [ + xiaomi_miot + ]; + }; + }; +} |
