diff --git a/lib/default.nix b/lib/default.nix index 864e26f..977e6b4 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,3 +1,5 @@ _: _: -{ } +{ + trimNewlines = builtins.replaceStrings [ "\n" ] [ "" ]; +} diff --git a/secrets/email.nix b/secrets/email.nix index 5457b36..ebc97dc 100644 Binary files a/secrets/email.nix and b/secrets/email.nix differ diff --git a/services/home-assistant.nix b/services/home-assistant.nix index 53c6919..4c06461 100644 --- a/services/home-assistant.nix +++ b/services/home-assistant.nix @@ -1,7 +1,6 @@ -{ config, my, pkgs, secrets, ... }: +{ config, lib, my, pkgs, secrets, ... }: let - trimNewlines = builtins.replaceStrings [ "\n" ] [ "" ]; hassCfg = config.services.home-assistant.config; mosquittoSecret = { sopsFile = ../secrets/sops/home-assistant.yaml; @@ -55,7 +54,7 @@ in { recorder.db_url = "postgresql://@/hass"; scene = { }; schedule = { }; - shell_command.poweroff_zero = trimNewlines '' + shell_command.poweroff_zero = lib.trimNewlines '' ${pkgs.openssh}/bin/ssh -i ${secrets."home-assistant/automation-sshkey".path} -o BatchMode=yes