Skip to content

Commit

Permalink
database: Don't add targets if no dbs are assigned
Browse files Browse the repository at this point in the history
Having unnecessary target units for every container is distracting for
users, so let's actually make sure that these targets only exist
whenever there are databases assigned.

Signed-off-by: aszlig <aszlig@nix.build>
Issue: #12
  • Loading branch information
aszlig committed Mar 21, 2018
1 parent 1433b4f commit ce59aed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/web/database/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ in {
'';
};

config = lib.mkIf config.enable {
config = lib.mkIf (config.enable && config.database != {}) {
systemd.targets = {
db-server = {
description = "Database Management Systems For ${config.uniqueName}";
Expand Down

0 comments on commit ce59aed

Please sign in to comment.