diff options
author | Izorkin <izorkin@elven.pw> | 2022-10-31 00:58:24 +0300 |
---|---|---|
committer | Izorkin <izorkin@elven.pw> | 2022-10-31 01:44:13 +0300 |
commit | c4f9538875af001e6173b192874e2826eab2a148 (patch) | |
tree | 5fabf66582d5745c5f8b52e984cc0d3374c26334 /nixos/modules/services/web-apps/peertube.nix | |
parent | 15959cdc5f52889585b85abc16c23c17f3d2c73f (diff) |
nixos/peertube: fix start services
Diffstat (limited to 'nixos/modules/services/web-apps/peertube.nix')
-rw-r--r-- | nixos/modules/services/web-apps/peertube.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nixos/modules/services/web-apps/peertube.nix b/nixos/modules/services/web-apps/peertube.nix index aea25af358b8..e3f8516d99c8 100644 --- a/nixos/modules/services/web-apps/peertube.nix +++ b/nixos/modules/services/web-apps/peertube.nix @@ -374,7 +374,7 @@ in { systemd.services.peertube-init-db = lib.mkIf cfg.database.createLocally { description = "Initialization database for PeerTube daemon"; after = [ "network.target" "postgresql.service" ]; - wantedBy = [ "multi-user.target" ]; + requires = [ "postgresql.service" ]; script = let psqlSetupCommands = pkgs.writeText "peertube-init.sql" '' @@ -403,7 +403,9 @@ in { systemd.services.peertube = { description = "PeerTube daemon"; after = [ "network.target" ] - ++ lib.optionals cfg.redis.createLocally [ "redis.service" ] + ++ lib.optional cfg.redis.createLocally "redis-peertube.service" + ++ lib.optionals cfg.database.createLocally [ "postgresql.service" "peertube-init-db.service" ]; + requires = lib.optional cfg.redis.createLocally "redis-peertube.service" ++ lib.optionals cfg.database.createLocally [ "postgresql.service" "peertube-init-db.service" ]; wantedBy = [ "multi-user.target" ]; |