6251c8edef
Pulls the services.openthread-border-router NixOS module directly from nixpkgs-unstable since it isn't in 25.11 yet. Service stays disabled in this commit; configuration follows. Also promotes `self` from `_module.args` to `specialArgs` in machines/configuration.nix, since `imports` are evaluated before `config` and so can't reach `_module.args.self`. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
53 lines
1.1 KiB
Nix
53 lines
1.1 KiB
Nix
# manages home automations
|
|
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
self,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.my.profiles.home-assistant;
|
|
hostName = config.networking.hostName;
|
|
in
|
|
{
|
|
imports = [
|
|
# services.openthread-border-router isn't in nixos-25.11; pull from
|
|
# nixpkgs-unstable. Package comes from the existing unstable overlay.
|
|
"${self.inputs.nixpkgs-unstable}/nixos/modules/services/home-automation/openthread-border-router.nix"
|
|
];
|
|
|
|
options.my.profiles.home-assistant = with lib; {
|
|
enable = mkEnableOption "Home Automation";
|
|
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
services.matter-server.enable = true;
|
|
|
|
services.home-assistant = {
|
|
enable = true;
|
|
openFirewall = true;
|
|
extraComponents = [
|
|
"matter"
|
|
"mobile_app"
|
|
];
|
|
};
|
|
services.home-assistant.config = {
|
|
name = "Home - Rechberg";
|
|
unit_system = "metric";
|
|
mobile_app = {};
|
|
};
|
|
|
|
my.homepage.services = [
|
|
{
|
|
group = "Services";
|
|
name = "Home Assistant";
|
|
description = "Home automation";
|
|
href = "http://${hostName}:8123";
|
|
icon = "si-homeassistant";
|
|
}
|
|
];
|
|
};
|
|
}
|