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,
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 = {
volumes = [
"/data/dirty/home-assistant:/config"
"${switches}:/config/switches.yaml"
"${config.sops.secrets.power-management-key.path}:/root/.ssh/power-management-key"
];
environment.TZ = "Europe/Berlin";