Skip to content

Commit

Permalink
nixos/gitea: fix systemd after target when mysql is the database of c…
Browse files Browse the repository at this point in the history
…hoice
  • Loading branch information
aanderse committed Nov 8, 2018
1 parent 290dd06 commit 0bbb6f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nixos/modules/services/misc/gitea.nix
Expand Up @@ -6,6 +6,7 @@ let
cfg = config.services.gitea;
gitea = cfg.package;
pg = config.services.postgresql;
useMysql = cfg.database.type == "mysql";
usePostgresql = cfg.database.type == "postgres";
configFile = pkgs.writeText "app.ini" ''
APP_NAME = ${cfg.appName}
Expand Down Expand Up @@ -253,7 +254,7 @@ in

systemd.services.gitea = {
description = "gitea";
after = [ "network.target" "postgresql.service" ];
after = [ "network.target" ] ++ lib.optional usePostgresql "postgresql.service" ++ lib.optional useMysql "mysql.service";
wantedBy = [ "multi-user.target" ];
path = [ gitea.bin ];

Expand Down

0 comments on commit 0bbb6f4

Please sign in to comment.