50 lines
1.2 KiB
Nix
50 lines
1.2 KiB
Nix
{ config, lib, ... }: {
|
|
|
|
options.sysconfig.opts.virtualization.homeassistant = {
|
|
enable = lib.options.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
};
|
|
configvol = lib.options.mkOption {
|
|
type = lib.types.str;
|
|
default = "/ssd1/Home-Assistant/data:/config";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf config.sysconfig.opts.virtualization.homeassistant.enable {
|
|
|
|
networking.hosts."192.168.100.25" = [ "hass.local" ];
|
|
|
|
containers.home-assistant = {
|
|
|
|
autoStart = true;
|
|
privateNetwork = true;
|
|
hostAddress = "192.168.100.10";
|
|
localAddress = "192.168.100.25";
|
|
|
|
config = {
|
|
|
|
services.home-assistant = {
|
|
enable = true;
|
|
|
|
openFirewall = true;
|
|
|
|
extraComponents = [
|
|
"wyoming"
|
|
"ollama"
|
|
];
|
|
|
|
config = {
|
|
homeassistant.unit_system = "us_customary";
|
|
};
|
|
|
|
configWritable = true;
|
|
|
|
};
|
|
|
|
system.stateVersion = "25.05";
|
|
};
|
|
};
|
|
};
|
|
}
|