mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue