Services.qbittorrent ignores the options set in configuration.nix

Im pretty new to NixOS and im confused about how options work.

What i expect to happen:
The username and password i set up declaratively lets me log into the webui

What happens:
username or password is incorrect, but using the default username but using the temporary password generated on the “first” startup (upon every single time the service is started) grepped from journalctl, i can log in.

Here is the relevant part of my config:

/etc/nixos/configuration.nix
60:  services.qbittorrent = {
61-    enable = true;
62-    serverConfig = {
63-      LegalNotice.Accepted = true;
64-      preferences.WebUI = {
65-        LocalHostAuth = true;
66-        extraArgs = "--confirm-legal-notice";
67-        Username = "doma";
68-        Password_PBKDF2 = "<PBKDF2 hash of the password>";
69-      };
70-    };
71-  };

However according to journalctl, qbitorrent is not aware of these configurations:

okt 03 01:00:51 nixos qbittorrent-nox[17676]: Catching signal: SIGTERM
okt 03 01:00:51 nixos qbittorrent-nox[17676]: Exiting cleanly
okt 03 01:00:51 nixos systemd[1]: Stopping qbittorrent BitTorrent client...
okt 03 01:00:51 nixos systemd[1]: qbittorrent.service: Deactivated successfully.
okt 03 01:00:51 nixos systemd[1]: Stopped qbittorrent BitTorrent client.
okt 03 01:00:51 nixos systemd[1]: qbittorrent.service: Consumed 769ms CPU time, 25M memory peak, 8.7M read from disk, 24K written to disk, 56K incoming IP traffic, 40.2K outgoing IP traffic.
okt 03 01:00:51 nixos systemd[1]: Started qbittorrent BitTorrent client.
okt 03 01:00:52 nixos qbittorrent-nox[18355]: WebUI will be started shortly after internal preparations. Please wait...
okt 03 01:00:52 nixos qbittorrent-nox[18355]: ******** Information ********
okt 03 01:00:52 nixos qbittorrent-nox[18355]: To control qBittorrent, access the WebUI at: http://localhost:8080
okt 03 01:00:52 nixos qbittorrent-nox[18355]: The WebUI administrator username is: admin
okt 03 01:00:52 nixos qbittorrent-nox[18355]: The WebUI administrator password was not set. A temporary password is provided for this session: R7QeeJMWt
okt 03 01:00:52 nixos qbittorrent-nox[18355]: You should set your own password in program preferences.
okt 03 01:08:41 nixos qbittorrent-nox[18355]: Catching signal: SIGTERM
okt 03 01:08:41 nixos qbittorrent-nox[18355]: Exiting cleanly
okt 03 01:08:41 nixos systemd[1]: Stopping qbittorrent BitTorrent client...
okt 03 01:08:41 nixos systemd[1]: qbittorrent.service: Deactivated successfully.
okt 03 01:08:41 nixos systemd[1]: Stopped qbittorrent BitTorrent client.
okt 03 01:08:41 nixos systemd[1]: qbittorrent.service: Consumed 559ms CPU time, 16.3M memory peak, 16K written to disk, 47.2K incoming IP traffic, 33.1K outgoing IP traffic.
okt 03 01:08:41 nixos systemd[1]: Started qbittorrent BitTorrent client.
okt 03 01:08:41 nixos qbittorrent-nox[18548]: WebUI will be started shortly after internal preparations. Please wait...
okt 03 01:08:42 nixos qbittorrent-nox[18548]: ******** Information ********
okt 03 01:08:42 nixos qbittorrent-nox[18548]: To control qBittorrent, access the WebUI at: http://localhost:8080
okt 03 01:08:42 nixos qbittorrent-nox[18548]: The WebUI administrator username is: admin
okt 03 01:08:42 nixos qbittorrent-nox[18548]: The WebUI administrator password was not set. A temporary password is provided for this session: nQUryIIKJ
okt 03 01:08:42 nixos qbittorrent-nox[18548]: You should set your own password in program preferences.

You spelled it wrong, it’s capital P.

Also, extraArgs do not go inside the serverConfig.
https://search.nixos.org/options?channel=unstable&show=services.qbittorrent.extraArgs&query=qbittorrent

1 Like

Oh my god, thanks. Don’t know how i missed these.