Monitoring + home assistant
This commit is contained in:
parent
ebdfe095d8
commit
4b6fc29c91
4 changed files with 101 additions and 2 deletions
47
systems/x86_64-linux/stargate/services/home-assistant.nix
Normal file
47
systems/x86_64-linux/stargate/services/home-assistant.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
services.home-assistant = {
|
||||
enable = true;
|
||||
extraComponents = [
|
||||
# Components required to complete the onboarding
|
||||
"esphome"
|
||||
"met"
|
||||
"radio_browser"
|
||||
"wiz"
|
||||
];
|
||||
config = {
|
||||
http = {
|
||||
server_host = "::1";
|
||||
trusted_proxies = ["::1"];
|
||||
use_x_forwarded_for = true;
|
||||
};
|
||||
recorder.db_url = "postgresql://@/hass";
|
||||
# Includes dependencies for a basic setup
|
||||
# https://www.home-assistant.io/integrations/default_config/
|
||||
default_config = {};
|
||||
};
|
||||
};
|
||||
services.home-assistant = {
|
||||
package =
|
||||
(pkgs.home-assistant.override {
|
||||
extraPackages = py: with py; [psycopg2];
|
||||
}).overrideAttrs (oldAttrs: {
|
||||
doInstallCheck = false;
|
||||
});
|
||||
};
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = ["hass"];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "hass";
|
||||
ensureDBOwnership = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue