Skip to content

Commit cf00e69

Browse files
authored
qbittorrent: depend on nixflix.serviceDependencies (#238)
With this change, one can add some "downloads-dir.mount" (say, an NFS mount) and ensure that qbittorrent starts after that mount. Without this dependency a system boot runs the risk of performing such a mount after qbittorrent starts, which invalidates the state of all torrents (and a manual force recheck being required, lest _all_ torrents are downloaded again). Adding all of nixflix service dependencies is perhaps a little overzealous, but it is more uniform than adding another option.
1 parent bcd2873 commit cf00e69

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- qBittorrent potentially starting before `nixflix.serviceDependencies` and thus losing track of downloaded files, lest a recheck was manually forced.
12+
913
### Added
1014

1115
- Starr app Media Management API configuration ([#221](https://github.com/kiriwalawren/nixflix/pull/221)).

modules/torrentClients/qbittorrent.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ in
250250
};
251251

252252
systemd.services.qbittorrent = {
253-
after = [ "nixflix-setup-dirs.service" ];
254-
requires = [ "nixflix-setup-dirs.service" ];
253+
after = [ "nixflix-setup-dirs.service" ] ++ config.nixflix.serviceDependencies;
254+
requires = [ "nixflix-setup-dirs.service" ] ++ config.nixflix.serviceDependencies;
255255
preStart = lib.mkIf (cfg.categories != { }) (
256256
lib.mkAfter ''
257257
cp -f '${categoriesFile}' '${configPath}/categories.json'

0 commit comments

Comments
 (0)