lib: add trimNewlines
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
parent
5280397071
commit
850c8a0cc1
|
@ -1,3 +1,5 @@
|
||||||
_: _:
|
_: _:
|
||||||
|
|
||||||
{ }
|
{
|
||||||
|
trimNewlines = builtins.replaceStrings [ "\n" ] [ "" ];
|
||||||
|
}
|
||||||
|
|
Binary file not shown.
|
@ -1,7 +1,6 @@
|
||||||
{ config, my, pkgs, secrets, ... }:
|
{ config, lib, my, pkgs, secrets, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
trimNewlines = builtins.replaceStrings [ "\n" ] [ "" ];
|
|
||||||
hassCfg = config.services.home-assistant.config;
|
hassCfg = config.services.home-assistant.config;
|
||||||
mosquittoSecret = {
|
mosquittoSecret = {
|
||||||
sopsFile = ../secrets/sops/home-assistant.yaml;
|
sopsFile = ../secrets/sops/home-assistant.yaml;
|
||||||
|
@ -55,7 +54,7 @@ in {
|
||||||
recorder.db_url = "postgresql://@/hass";
|
recorder.db_url = "postgresql://@/hass";
|
||||||
scene = { };
|
scene = { };
|
||||||
schedule = { };
|
schedule = { };
|
||||||
shell_command.poweroff_zero = trimNewlines ''
|
shell_command.poweroff_zero = lib.trimNewlines ''
|
||||||
${pkgs.openssh}/bin/ssh
|
${pkgs.openssh}/bin/ssh
|
||||||
-i ${secrets."home-assistant/automation-sshkey".path}
|
-i ${secrets."home-assistant/automation-sshkey".path}
|
||||||
-o BatchMode=yes
|
-o BatchMode=yes
|
||||||
|
|
Loading…
Reference in a new issue