Open sochotnicky opened 1 day ago
systemd service for wakapi uses following construct:
EnvironmentFile = [ (optional (cfg.passwordSaltFile != null) cfg.passwordSaltFile) (optional (cfg.smtpPasswordFile != null) cfg.smtpPasswordFile) ];
At: https://github.com/NixOS/nixpkgs/blob/a466f1462734692cd484f184a978187f250eabdc/nixos/modules/services/web-apps/wakapi.nix#L146-L147
When passwordSaltFile is set but smtpPasswordFile is unset this results in following in systemd unit:
passwordSaltFile
smtpPasswordFile
EnvironmentFile=<path to salt file> EnvironmentFile=
As per systemd docs - this results in "wiping" EnvironmentFile config.
Steps to reproduce the behavior:
It should be possible to set passwordSaltFile without setting smtpPasswordFile
Perhaps just using mkIf instead of optional might serve?
mkIf
optional
As a workaround setting smtpPasswordFile to same value as passwordSaltFile makes things work.
@isabelroses @NotAShelf
Note for maintainers: Please tag this issue in your PR.
Add a :+1: reaction to issues you find important.
Thanks for the report, I will take a look and submit a patch shortly.
Describe the bug
systemd service for wakapi uses following construct:
At: https://github.com/NixOS/nixpkgs/blob/a466f1462734692cd484f184a978187f250eabdc/nixos/modules/services/web-apps/wakapi.nix#L146-L147
When
passwordSaltFile
is set butsmtpPasswordFile
is unset this results in following in systemd unit:As per systemd docs - this results in "wiping" EnvironmentFile config.
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should be possible to set
passwordSaltFile
without settingsmtpPasswordFile
Additional context
Perhaps just using
mkIf
instead ofoptional
might serve?As a workaround setting
smtpPasswordFile
to same value aspasswordSaltFile
makes things work.Metadata
Notify maintainers
@isabelroses @NotAShelf
Note for maintainers: Please tag this issue in your PR.
Add a :+1: reaction to issues you find important.