summary refs log tree commit diff
diff options
context:
space:
mode:
authorRodney Lorrimar <dev@rodney.id.au>2017-09-13 01:12:26 +0100
committerFranz Pletz <fpletz@fnordicwalking.de>2017-09-17 18:41:53 +0200
commit6460e459de8a8dc4a816319ed971861a57d8657c (patch)
treee683e15bab0ad2df8dadb59ab1cbe2a8193e8424
parentea1d5e9c7a054eb4ec2660e144133bdbb58a0ae0 (diff)
downloadnixpkgs-6460e459de8a8dc4a816319ed971861a57d8657c.tar
nixpkgs-6460e459de8a8dc4a816319ed971861a57d8657c.tar.gz
nixpkgs-6460e459de8a8dc4a816319ed971861a57d8657c.tar.bz2
nixpkgs-6460e459de8a8dc4a816319ed971861a57d8657c.tar.lz
nixpkgs-6460e459de8a8dc4a816319ed971861a57d8657c.tar.xz
nixpkgs-6460e459de8a8dc4a816319ed971861a57d8657c.tar.zst
nixpkgs-6460e459de8a8dc4a816319ed971861a57d8657c.zip
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
-rw-r--r--nixos/modules/services/misc/gogs.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/gogs.nix b/nixos/modules/services/misc/gogs.nix
index ad2e36d04d5..d6e827a53fd 100644
--- a/nixos/modules/services/misc/gogs.nix
+++ b/nixos/modules/services/misc/gogs.nix
@@ -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;