Strip newline when reading password files
This commit is contained in:
parent
191429b307
commit
58558577b7
|
@ -12,6 +12,8 @@ let
|
||||||
|
|
||||||
hostSecrets = config.fudo.secrets.host-secrets."${config.instance.hostname}";
|
hostSecrets = config.fudo.secrets.host-secrets."${config.instance.hostname}";
|
||||||
|
|
||||||
|
removeNewline = removeSuffix "\n";
|
||||||
|
|
||||||
frigateCfg = let
|
frigateCfg = let
|
||||||
content = builtins.toJSON {
|
content = builtins.toJSON {
|
||||||
mqtt = {
|
mqtt = {
|
||||||
|
@ -188,8 +190,8 @@ in {
|
||||||
fudo.secrets.host-secrets."${config.instance.hostname}" = {
|
fudo.secrets.host-secrets."${config.instance.hostname}" = {
|
||||||
frigateEnv = {
|
frigateEnv = {
|
||||||
source-file = let
|
source-file = let
|
||||||
camPasswd = readFile cfg.camera-password-file;
|
camPasswd = removeNewline (readFile cfg.camera-password-file);
|
||||||
mqttPasswd = readFile cfg.mqtt.password-file;
|
mqttPasswd = removeNewline (readFile cfg.mqtt.password-file);
|
||||||
in makeEnvFile {
|
in makeEnvFile {
|
||||||
FRIGATE_RTSP_PASSWORD = camPasswd;
|
FRIGATE_RTSP_PASSWORD = camPasswd;
|
||||||
FRIGATE_MQTT_PASSWORD = mqttPasswd;
|
FRIGATE_MQTT_PASSWORD = mqttPasswd;
|
||||||
|
|
Loading…
Reference in New Issue