flake with HA

This commit is contained in:
Sveske-Juice 2025-05-27 13:04:52 +02:00
commit 2ce243c321
4 changed files with 151 additions and 0 deletions

58
configuration.nix Normal file
View file

@ -0,0 +1,58 @@
{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
];
};
}