initial home assistant change
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
CHROOT_DIR=/home/chroot
|
CHROOT_DIR=/home/chroot
|
||||||
REMOTE_IP=fw.cloonar.com
|
REMOTE_IP=git.cloonar.com
|
||||||
|
|
||||||
# Optional
|
# Optional
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
# ./modules/podman.nix
|
# ./modules/podman.nix
|
||||||
|
|
||||||
# home assistant
|
# home assistant
|
||||||
# ./modules/home-assistant.nix
|
./modules/home-assistant.nix
|
||||||
# ./modules/mopidy.nix
|
# ./modules/mopidy.nix
|
||||||
# ./modules/mosquitto.nix
|
# ./modules/mosquitto.nix
|
||||||
# ./modules/snapserver.nix
|
# ./modules/snapserver.nix
|
||||||
|
|||||||
@@ -98,6 +98,11 @@
|
|||||||
ip-address = "10.42.97.50";
|
ip-address = "10.42.97.50";
|
||||||
server-hostname = "git.cloonar.com";
|
server-hostname = "git.cloonar.com";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
hw-address = "1a:c4:04:6e:29:01";
|
||||||
|
ip-address = "10.42.97.20";
|
||||||
|
server-hostname = "home-assistant.cloonar.com";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -100,10 +100,6 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
sops.secrets.gitea-runner-token = {
|
|
||||||
owner = "gitea-runner";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.gitea-actions-runner.instances.main = {
|
services.gitea-actions-runner.instances.main = {
|
||||||
enable = true;
|
enable = true;
|
||||||
url = "https://git.cloonar.com";
|
url = "https://git.cloonar.com";
|
||||||
|
|||||||
@@ -1,16 +1,30 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
virtualisation.oci-containers = {
|
users.users.homeassistant = {
|
||||||
backend = "podman";
|
isSystemUser = true;
|
||||||
containers.homeassistant = {
|
group = "homeassistant";
|
||||||
volumes = [ "home-assistant:/config" ];
|
home = "/var/lib/homeassistant";
|
||||||
environment.TZ = "Europe/Vienna";
|
createHome = true;
|
||||||
|
};
|
||||||
|
users.groups.homeassistant = { };
|
||||||
|
|
||||||
|
# TODO: check if we can run docker service as other user than root
|
||||||
|
virtualisation = {
|
||||||
|
oci-containers.containers = {
|
||||||
|
homeassistant = {
|
||||||
|
autoStart = true;
|
||||||
image = "ghcr.io/home-assistant/home-assistant:2023.9.3";
|
image = "ghcr.io/home-assistant/home-assistant:2023.9.3";
|
||||||
|
volumes = [
|
||||||
|
"/var/lib/homeassistant:/config"
|
||||||
|
];
|
||||||
|
environment.TZ = "Europe/Vienna";
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--ip=10.42.97.20"
|
"--network=server"
|
||||||
|
"--mac-address=1a:c4:04:6e:29:01"
|
||||||
"--device=/dev/serial/by-id/usb-EnOcean_GmbH_EnOcean_USB_300_DC_FT5OI9YG-if00-port0:/dev/serial/by-id/usb-EnOcean_GmbH_EnOcean_USB_300_DC_FT5OI9YG-if00-port0"
|
"--device=/dev/serial/by-id/usb-EnOcean_GmbH_EnOcean_USB_300_DC_FT5OI9YG-if00-port0:/dev/serial/by-id/usb-EnOcean_GmbH_EnOcean_USB_300_DC_FT5OI9YG-if00-port0"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts."home-assistant.cloonar.com" = {
|
services.nginx.virtualHosts."home-assistant.cloonar.com" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
@@ -20,7 +34,7 @@
|
|||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
'';
|
'';
|
||||||
locations."/".extraConfig = ''
|
locations."/".extraConfig = ''
|
||||||
proxy_pass http://127.0.0.1:8123;
|
proxy_pass http://10.42.97.20:8123;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_redirect http:// https://;
|
proxy_redirect http:// https://;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
|
|||||||
@@ -32,8 +32,7 @@ let
|
|||||||
"\"switch.cloonar.com IN A 10.42.97.10\""
|
"\"switch.cloonar.com IN A 10.42.97.10\""
|
||||||
"\"drone.cloonar.com IN A 10.42.97.118\""
|
"\"drone.cloonar.com IN A 10.42.97.118\""
|
||||||
"\"hv-02.cloonar.com IN A 10.42.97.3\""
|
"\"hv-02.cloonar.com IN A 10.42.97.3\""
|
||||||
"\"home-assistant.cloonar.com IN A 10.42.97.20\""
|
"\"home-assistant.cloonar.com IN A 10.42.97.1\""
|
||||||
"\"home-assistant.cloonar.old IN A 10.44.97.20\""
|
|
||||||
"\"deconz.cloonar.com IN A 10.42.97.20\""
|
"\"deconz.cloonar.com IN A 10.42.97.20\""
|
||||||
"\"mopidy.cloonar.com IN A 10.42.97.20\""
|
"\"mopidy.cloonar.com IN A 10.42.97.20\""
|
||||||
"\"snapcast.cloonar.com IN A 10.42.97.20\""
|
"\"snapcast.cloonar.com IN A 10.42.97.20\""
|
||||||
@@ -75,12 +74,7 @@ let
|
|||||||
local-data-ptr = [
|
local-data-ptr = [
|
||||||
"\"127.0.0.1 localhost\""
|
"\"127.0.0.1 localhost\""
|
||||||
"\"::1 localhost\""
|
"\"::1 localhost\""
|
||||||
"\"10.42.97.10 switch.cloonar.com\""
|
|
||||||
"\"10.42.97.1 fw.cloonar.com\""
|
"\"10.42.97.1 fw.cloonar.com\""
|
||||||
"\"10.42.97.118 drone.cloonar.com\""
|
|
||||||
"\"10.42.97.3 hv-02.cloonar.com\""
|
|
||||||
"\"10.42.97.20 home-assistant.cloonar.com\""
|
|
||||||
"\"10.42.97.9 cl-storage-01.cloonar.com\""
|
|
||||||
|
|
||||||
"\"10.254.235.22 stage.wsw.at\""
|
"\"10.254.235.22 stage.wsw.at\""
|
||||||
"\"10.254.217.23 prod.wsw.at\""
|
"\"10.254.217.23 prod.wsw.at\""
|
||||||
|
|||||||
Reference in New Issue
Block a user