From 88869f563454829fcdf4212fb65e050c8a336f50 Mon Sep 17 00:00:00 2001 From: "root@nixos-nas" <> Date: Wed, 3 Sep 2025 17:21:39 +0000 Subject: [PATCH] Home-Assistant first try --- configuration.nix | 6 +++++- modules/home-assistant.nix | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 modules/home-assistant.nix diff --git a/configuration.nix b/configuration.nix index ac961d0..bbf0d90 100644 --- a/configuration.nix +++ b/configuration.nix @@ -17,7 +17,10 @@ let ''; in { - imports = [ ./hardware/hardware-configuration.nix ]; + nixpkgs.config.permittedInsecurePackages = [ + "openssl-1.1.1w" + ]; + imports = [ ./hardware/hardware-configuration.nix ./modules/home-assistant.nix ]; nixpkgs.config.allowUnfree = true; boot.loader.systemd-boot.enable = true; @@ -32,6 +35,7 @@ in networking.hostName = "nix-nas"; networking.hostId = "39373132"; # via: head -c4 /etc/machine-id | od -An -tx4 + networking.firewall.allowedTCPPorts = [ 22 80 443 8123 ]; fileSystems."/" = { device = "rpool/root"; diff --git a/modules/home-assistant.nix b/modules/home-assistant.nix new file mode 100644 index 0000000..4cbea94 --- /dev/null +++ b/modules/home-assistant.nix @@ -0,0 +1,34 @@ +{ + services.home-assistant = { + enable = true; + extraComponents = [ + # Components required to complete the onboarding + "esphome" + "homeassistant_hardware" + "zha" + "met" + "radio_browser" + "wled" + "marytts" + "mastodon" + "matter" + "mealie" + "isal" + "dhcp" + "go2rtc" + "mobile_app" + "ssdp" + "stream" + ]; + # opt-out from declarative configuration management + config = null; + lovelaceConfig = null; + # configure the path to your config directory + configDir = "/etc/home-assistant"; + # config = { + # # Includes dependencies for a basic setup + # # https://www.home-assistant.io/integrations/default_config/ + # default_config = {}; + # }; + }; +}