mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-24 15:44:16 -05:00
Add home-assistant
This commit is contained in:
parent
367385f1bc
commit
715e2f5d46
5 changed files with 47 additions and 0 deletions
28
hosts/WCE-Home/default.nix
Normal file
28
hosts/WCE-Home/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{lib, config, pkgs, ...}:{
|
||||
imports = [
|
||||
../../modules
|
||||
];
|
||||
|
||||
networking.hostName = "WCE-Home";
|
||||
networking.firewall.allowedTCPPorts = [ 8123 ];
|
||||
|
||||
virtualisation.oci-containers = {
|
||||
backend = "podman";
|
||||
containers.homeassistant = {
|
||||
volumes = [ "home-assistant:/config" ];
|
||||
environment.TZ = "America/New_York";
|
||||
image = "ghcr.io/home-assistant/home-assistant:stable";
|
||||
extraOptions = [
|
||||
"--network=host",
|
||||
"--device=/dev/ttyACM0:/dev/ttyACM0";
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
packages.gui.enable = false;
|
||||
packages.wayland.enable = false;
|
||||
packages.programming.enable = false;
|
||||
|
||||
users.crow.enable = false;
|
||||
users.ha.enable = true;
|
||||
}
|
||||
|
|
@ -26,6 +26,9 @@
|
|||
vault = {
|
||||
enable = lib.mkEnableOption "enable vault";
|
||||
};
|
||||
ha = {
|
||||
enable = lib.mkEnableOption "enable home assistant user";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -48,6 +51,9 @@
|
|||
vault = {
|
||||
enable = lib.mkDefault false;
|
||||
};
|
||||
ha = {
|
||||
enable = lib.mkDefault false;
|
||||
};
|
||||
};
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
imports = [
|
||||
./crow
|
||||
./vault
|
||||
./ha
|
||||
];
|
||||
|
||||
config.home-manager = {
|
||||
|
|
|
|||
5
modules/users/ha/default.nix
Normal file
5
modules/users/ha/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{lib, config, ...}: {
|
||||
imports = [
|
||||
./user.nix
|
||||
];
|
||||
}
|
||||
7
modules/users/ha/user.nix
Normal file
7
modules/users/ha/user.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ lib, config, ...}: {
|
||||
config.users.users.ha = lib.mkIf config.users.ha.enable {
|
||||
isNormalUser = true;
|
||||
initialPassword = "changeme";
|
||||
extraGroups = [ "wheel" "libvirtd" ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue