1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

fix: generators can't output newline-free files

This commit is contained in:
oddlama 2024-08-01 02:05:52 +02:00
parent 65ca9a35c5
commit f4a0923f5a
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
2 changed files with 3 additions and 2 deletions

View file

@ -55,7 +55,6 @@
${decrypt} ${lib.escapeShellArg dep.file} \ ${decrypt} ${lib.escapeShellArg dep.file} \
| tr -d '\n' \ | tr -d '\n' \
| ${pkgs.libargon2}/bin/argon2 "$(${pkgs.openssl}/bin/openssl rand -base64 16)" -id -e \ | ${pkgs.libargon2}/bin/argon2 "$(${pkgs.openssl}/bin/openssl rand -base64 16)" -id -e \
| tr -d '\n' \
|| die "Failure while generating argon2id hash" || die "Failure while generating argon2id hash"
''; '';

View file

@ -66,7 +66,7 @@ in {
lib.mkForce { lib.mkForce {
authentication.fallback-admin = { authentication.fallback-admin = {
user = "admin"; user = "admin";
secret = "%{file:${config.age.secrets.stalwart-admin-hash.path}}%"; secret = "%{file:/run/stalwart-mail/admin-hash}%";
}; };
tracer.stdout = { tracer.stdout = {
@ -478,6 +478,8 @@ in {
in { in {
preStart = lib.mkAfter '' preStart = lib.mkAfter ''
cat ${configFile} > /run/stalwart-mail/config.toml cat ${configFile} > /run/stalwart-mail/config.toml
cat ${config.age.secrets.stalwart-admin-hash.path} \
| tr -d '\n' > /run/stalwart-mail/admin-hash
''; '';
serviceConfig = { serviceConfig = {
RuntimeDirectory = "stalwart-mail"; RuntimeDirectory = "stalwart-mail";