feat(host/faunus-ater): experiment with nixifying the home assistant config

This commit is contained in:
Malte Tammena 2024-11-17 15:15:11 +01:00
parent 3ab6910395
commit 7449ab4dee

View file

@ -3,10 +3,23 @@
lib, lib,
config, config,
... ...
}: { }: let
writeYaml = (pkgs.formats.yaml {}).generate;
switches = writeYaml "switches.yaml" [
{
platform = "wake_on_lan";
mac = "88:AE:DD:0F:2A:1E";
host = "tv.lan";
name = "TV Power";
turn_off.action = "shell_command.turn_off_tv";
}
];
in {
virtualisation.oci-containers.containers.home-assistant = { virtualisation.oci-containers.containers.home-assistant = {
volumes = [ volumes = [
"/data/dirty/home-assistant:/config" "/data/dirty/home-assistant:/config"
"${switches}:/config/switches.yaml"
"${config.sops.secrets.power-management-key.path}:/root/.ssh/power-management-key" "${config.sops.secrets.power-management-key.path}:/root/.ssh/power-management-key"
]; ];
environment.TZ = "Europe/Berlin"; environment.TZ = "Europe/Berlin";