make home assistant more reproducible and work better

This commit is contained in:
foxora 2026-02-20 01:42:25 +00:00
parent 273023ac5a
commit 15bd9a684b

View file

@ -2,10 +2,39 @@
{
services.home-assistant = {
enable = true;
configDir = "/var/lib/microvms/home-assistant";
configDir = "/var/lib/hass";
# disables config generation, i don't wanna configure home assistant
# through nix at the moment
config = null;
extraComponents = [
"esphome"
"met"
"radio_browser"
];
extraPackages = python3Packages: with python3Packages; [
getmac
];
};
systemd.tmpfiles.rules = [
# configures the config directory to be mounted
# correclty with the right permissions
"z /var/lib/hass 0755 hass hass -"
"z /var/lib/hass/lost+found 0755 hass hass -"
];
networking = {
nftables.enable = true;
firewall = {
enable = true;
allowedTCPPorts = [
8123
];
};
};
users.users.nixos = {