nixos/gogs: Fix module when no passwords provided
If neither database.password or database.passwordFile were provided,
it would try and fail to coerce null to a string.
This fixes the situation where there is no password for the database.
Resolves #27950
commit6460e459de8a8dc4a816319ed971861a57d8657c
authorRodney Lorrimar <dev@rodney.id.au>
dateWed 13 Sep 2017, 01:12 (9 years ago)
parentea1d5e9
nixos/modules/services/misc/gogs.nix+1−1
@@ -257,7 +257,7 @@ in
257257 in the Nix store. Use database.passwordFile instead.'';
258258
259259 # Create database passwordFile default when password is configured.
260− services.gogs.database.passwordFile = mkIf (cfg.database.password != "")
260+ services.gogs.database.passwordFile =
261261 (mkDefault (toString (pkgs.writeTextFile {
262262 name = "gogs-database-password";
263263 text = cfg.database.password;