mirror of
https://git.sr.ht/~magic_rb/cluster
synced 2024-11-28 02:56:13 +01:00
ae174de04d
Signed-off-by: Magic_RB <magic_rb@redalder.org> Update flake.lock Signed-off-by: Magic_RB <magic_rb@redalder.org> wip!! Signed-off-by: Magic_RB <magic_rb@redalder.org> wip!!! Signed-off-by: Magic_RB <magic_rb@redalder.org> wip!!! Signed-off-by: Magic_RB <magic_rb@redalder.org> wip!!!! Signed-off-by: Magic_RB <magic_rb@redalder.org> wip!!!!! Signed-off-by: Magic_RB <magic_rb@redalder.org> wip!!!!!! Signed-off-by: Magic_RB <magic_rb@redalder.org> wip!!!!!!! Signed-off-by: Magic_RB <magic_rb@redalder.org>
91 lines
2.9 KiB
Nix
91 lines
2.9 KiB
Nix
{ nglib, nixpkgs }:
|
|
nglib.makeSystem {
|
|
system = "x86_64-linux";
|
|
name = "nixng-home-assistant";
|
|
inherit nixpkgs;
|
|
config = ({ pkgs, config, nglib, ... }:
|
|
let
|
|
ids = config.ids;
|
|
in
|
|
{
|
|
config = {
|
|
dumb-init = {
|
|
enable = true;
|
|
type.services = { };
|
|
};
|
|
|
|
init.services.home-assistant = {
|
|
shutdownOnExit = true;
|
|
};
|
|
|
|
services.home-assistant = {
|
|
enable = true;
|
|
envsubst = true;
|
|
customComponents = {
|
|
xiaomi_gateway3 = pkgs.fetchFromGitHub {
|
|
owner = "AlexxIT";
|
|
repo = "XiaomiGateway3";
|
|
rev = "v1.6.5";
|
|
sha256 = "sha256-RSIJqsbgnktl7zNaxAKUoMjbkrJ1aJTej0vjlCgstJ8=";
|
|
} + "/custom_components/xiaomi_gateway3";
|
|
};
|
|
config =
|
|
{ default_config = {};
|
|
http = {
|
|
server_port = "8123";
|
|
use_x_forwarded_for = true;
|
|
trusted_proxies = [ "127.0.0.1" ];
|
|
};
|
|
logger.default = "info";
|
|
homeassistant =
|
|
{ name = "Home";
|
|
latitude = "\${LATITUDE}";
|
|
longitude = "\${LONGTITUDE}";
|
|
elevation = "\${ELEVATION}";
|
|
# currency = "EUR";
|
|
unit_system = "metric";
|
|
time_zone = "\${TIME_ZONE}";
|
|
internal_url = "http://localhost:8123/";
|
|
};
|
|
automation = "!include automations.yaml";
|
|
"automation static" = [
|
|
(import ./home-assistant/automations/alarm/pending.nix)
|
|
(import ./home-assistant/automations/alarm/disarmed.nix)
|
|
(import ./home-assistant/automations/alarm/triggered.nix)
|
|
(import ./home-assistant/automations/alarm/motion-detected.nix)
|
|
];
|
|
alarm_control_panel = import ./home-assistant/alarm_control_panel.nix;
|
|
frontend.themes =
|
|
{ };
|
|
};
|
|
package =
|
|
(pkgs.home-assistant.override
|
|
{ extraComponents =
|
|
[ "http"
|
|
"homeassistant"
|
|
"image"
|
|
"person"
|
|
"cloud"
|
|
"onboarding"
|
|
"frontend"
|
|
"safe_mode"
|
|
"met"
|
|
"zha"
|
|
"mobile_app"
|
|
"dhcp"
|
|
"logbook"
|
|
"history"
|
|
"ssdp"
|
|
"mqtt"
|
|
];
|
|
extraPackages = ps: with ps;
|
|
[ xmodem
|
|
];
|
|
}).overridePythonAttrs (old:
|
|
{ doCheck = false;
|
|
});
|
|
};
|
|
};
|
|
});
|
|
}
|