Arion: Add homeassistant
This commit is contained in:
parent
61c6788047
commit
af3d70ccf0
4 changed files with 47 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
|||
./passwords
|
||||
./media
|
||||
./dashboard
|
||||
./smarthome
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [arion];
|
||||
|
|
33
hosts/franz/arion/smarthome/arion-compose.nix
Normal file
33
hosts/franz/arion/smarthome/arion-compose.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{pkgs, ...}: {
|
||||
project.name = "smarthome";
|
||||
|
||||
networks.dmz = {
|
||||
name = "dmz";
|
||||
external = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
homeassistant.service = {
|
||||
image = "ghcr.io/home-assistant/home-assistant:stable";
|
||||
container_name = "homeassistant";
|
||||
privileged = true;
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
"traefik.http.routers.homeassistant.entrypoints" = "websecure";
|
||||
"traefik.http.routers.homeassistant.rule" = "Host(`home.ghoscht.com`)";
|
||||
"traefik.http.routers.homeassistant.tls" = "true";
|
||||
"traefik.http.routers.homeassistant.tls.certresolver" = "letsencrypt";
|
||||
"traefik.http.services.homeassistant.loadbalancer.server.port" = "8123";
|
||||
};
|
||||
volumes = [
|
||||
"/home/ghoscht/.docker/smarthome/homeassistant_data:/config"
|
||||
"/etc/localtime:/etc/localtime:ro"
|
||||
"/run/dbus:/run/dbus:ro"
|
||||
];
|
||||
restart = "always";
|
||||
networks = [
|
||||
"dmz"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
6
hosts/franz/arion/smarthome/arion-pkgs.nix
Normal file
6
hosts/franz/arion/smarthome/arion-pkgs.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Instead of pinning Nixpkgs, we can opt to use the one in NIX_PATH
|
||||
import <nixpkgs> {
|
||||
# We specify the architecture explicitly. Use a Linux remote builder when
|
||||
# calling arion from other platforms.
|
||||
system = "x86_64-linux";
|
||||
}
|
7
hosts/franz/arion/smarthome/default.nix
Normal file
7
hosts/franz/arion/smarthome/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{config, ...}: {
|
||||
virtualisation.arion = {
|
||||
projects.smarthome.settings = {
|
||||
imports = [./arion-compose.nix];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue