forked from foxora/nix
make home assistant more reproducible and work better
This commit is contained in:
parent
273023ac5a
commit
15bd9a684b
1 changed files with 30 additions and 1 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue