nixos/gitea: only require databases if createDatabase is set
Currently the database service (mysql/postgresql) is required by the gitea service. If none of them exists on the same machine as gitea it will refuse to start. With this change it is only required if createDatabase was set to true.
This commit is contained in:
parent
a8a76bb718
commit
70cc0d412f
|
@ -499,7 +499,7 @@ in
|
|||
systemd.services.gitea = {
|
||||
description = "gitea";
|
||||
after = [ "network.target" ] ++ optional usePostgresql "postgresql.service" ++ optional useMysql "mysql.service";
|
||||
requires = optional usePostgresql "postgresql.service" ++ optional useMysql "mysql.service";
|
||||
requires = optional (cfg.database.createDatabase && usePostgresql) "postgresql.service" ++ optional (cfg.database.createDatabase && useMysql) "mysql.service";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ cfg.package pkgs.git pkgs.gnupg ];
|
||||
|
||||
|
|
Loading…
Reference in a new issue