flake with HA
This commit is contained in:
commit
2ce243c321
4 changed files with 151 additions and 0 deletions
58
configuration.nix
Normal file
58
configuration.nix
Normal 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
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue