ha-flake/configuration.nix
2025-05-27 13:04:52 +02:00

58 lines
1.1 KiB
Nix

{pkgs, ...}: {
system.stateVersion = "24.05";
users.groups.admin = {};
users.users = {
admin = {
isNormalUser = true;
extraGroups = ["wheel"];
password = "admin";
group = "admin";
};
};
services.openssh = {
enable = true;
settings.PasswordAuthentication = true;
};
networking.firewall.allowedTCPPorts = [22 8123];
environment.systemPackages = with pkgs; [
htop
];
virtualisation.vmVariant.virtualisation = {
forwardPorts = [
# ssh
{
from = "host";
host.port = 2221;
guest.port = 22;
}
# HA
{
from = "host";
host.port = 8123;
guest.port = 8123;
}
];
};
services.home-assistant = {
enable = true;
extraComponents = [
# Components required to complete the onboarding
"esphome"
"met"
"radio_browser"
"matter"
];
config = {
# Includes dependencies for a basic setup
# https://www.home-assistant.io/integrations/default_config/
default_config = {};
};
extraPackages = python3Packages:
with python3Packages; [
gtts
];
};
}