This commit is contained in:
mjallen18
2026-01-30 22:45:46 -06:00
parent 044bac7464
commit bca4a13614
14 changed files with 581 additions and 342 deletions

View File

@@ -0,0 +1,46 @@
{
config,
lib,
namespace,
...
}:
with lib;
let
cfg = config.${namespace}.services.home-assistant;
in
{
config = mkIf cfg.enable {
sops = {
secrets = {
"jallen-nas/govee2mqtt/govee-email" = {
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
};
"jallen-nas/govee2mqtt/govee-password" = {
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
};
"jallen-nas/govee2mqtt/govee-api" = {
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
};
};
templates = {
"govee2mqtt.env" = {
mode = "660";
restartUnits = [ "govee2mqtt.service" ];
content = ''
GOVEE_EMAIL=${config.sops.placeholder."jallen-nas/govee2mqtt/govee-email"}
GOVEE_PASSWORD=${config.sops.placeholder."jallen-nas/govee2mqtt/govee-password"}
GOVEE_API_KEY=${config.sops.placeholder."jallen-nas/govee2mqtt/govee-api"}
GOVEE_MQTT_HOST=localhost
GOVEE_MQTT_PORT=1883
'';
};
};
};
services = {
govee2mqtt = {
enable = true;
environmentFile = config.sops.templates."govee2mqtt.env".path;
};
};
};
}

View File

@@ -11,19 +11,19 @@ let
cfg = config.${namespace}.services.home-assistant;
in
{
disabledModules = [
"services/home-automation/home-assistant.nix"
];
# disabledModules = [
# "services/home-automation/home-assistant.nix"
# ];
imports = [
"${inputs.nixpkgs-unstable}/nixos/modules/services/home-automation/home-assistant.nix"
];
# imports = [
# "${inputs.nixpkgs-unstable}/nixos/modules/services/home-automation/home-assistant.nix"
# ];
config = mkIf cfg.enable {
services.home-assistant = {
enable = true;
package = pkgs.unstable.home-assistant;
package = pkgs.home-assistant;
openFirewall = true;
configDir = "/var/lib/homeassistant";
configWritable = true; # todo
@@ -252,6 +252,7 @@ in
ha-bambulab
ha-bedjet
ha-gehome
# ha-govee
ha-icloud3
ha-local-llm
ha-mail-and-packages