Skip to content

Commit

Permalink
nixos/gogs: Fix module when no passwords provided
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rvl authored and fpletz committed Sep 17, 2017
1 parent ea1d5e9 commit 6460e45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nixos/modules/services/misc/gogs.nix
Expand Up @@ -257,7 +257,7 @@ in
in the Nix store. Use database.passwordFile instead.'';

# Create database passwordFile default when password is configured.
services.gogs.database.passwordFile = mkIf (cfg.database.password != "")
services.gogs.database.passwordFile =
(mkDefault (toString (pkgs.writeTextFile {
name = "gogs-database-password";
text = cfg.database.password;
Expand Down

0 comments on commit 6460e45

Please sign in to comment.