Add home-assistant container service

Move home/default into personal.nix and work.nix instead of flake, was
pulling in whole desktop config for server and wasting time/space
This commit is contained in:
Evie Litherland-Smith 2024-07-21 18:40:13 +01:00
parent 590db02129
commit af37c0c34a
5 changed files with 17 additions and 2 deletions

View file

@ -109,7 +109,6 @@
imports = [ imports = [
base16.homeManagerModule base16.homeManagerModule
{scheme = "${tt-schemes}/base16/one-light.yaml";} {scheme = "${tt-schemes}/base16/one-light.yaml";}
./home/default.nix
./home/${hostName}.nix ./home/${hostName}.nix
]; ];
home = { home = {

View file

@ -1,3 +1,4 @@
{pkgs, ...}: { {pkgs, ...}: {
imports = [./default.nix];
home.packages = with pkgs; [kdePackages.ktorrent]; home.packages = with pkgs; [kdePackages.ktorrent];
} }

View file

@ -4,6 +4,7 @@
pkgs, pkgs,
... ...
}: { }: {
imports = [./default.nix];
home.packages = with pkgs; [ home.packages = with pkgs; [
twinkle twinkle
(import ./scripts/ukaea-vpn.nix pkgs) (import ./scripts/ukaea-vpn.nix pkgs)

View file

@ -3,9 +3,10 @@
./services/caddy.nix ./services/caddy.nix
./services/forgejo.nix ./services/forgejo.nix
./services/grafana.nix ./services/grafana.nix
./services/home-assistant.nix
./services/minecraft.nix ./services/minecraft.nix
./services/nix-serve.nix ./services/nix-serve.nix
./services/radicale.nix # ./services/radicale.nix
./services/sshd.nix ./services/sshd.nix
./services/syncthing.nix ./services/syncthing.nix
# ./services/znc.nix # ./services/znc.nix
@ -16,4 +17,5 @@
}; };
users.mutableUsers = false; users.mutableUsers = false;
system.autoUpgrade.operation = "switch"; system.autoUpgrade.operation = "switch";
hardware.bluetooth.enable = true;
} }

View file

@ -0,0 +1,12 @@
{config, ...}: {
virtualisation.oci-containers = {
backend = "podman";
containers.homeassistant = {
volumes = ["home-assistant:/config" "/run/dbus:/run/dbus:ro"];
environment.TZ = config.time.timeZone;
image = "ghcr.io/home-assistant/home-assistant:2024.8.0.dev202407210221";
extraOptions = ["--network=host"];
};
};
services.caddy.virtualHosts."home.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:8123";
}