nixos/qbittorrent: just copy the config file in ourselves (#503269)

This commit is contained in:
K900
2026-03-25 06:36:49 +00:00
committed by GitHub
@@ -154,11 +154,6 @@ in
mode = "755";
inherit (cfg) user group;
};
"${cfg.profileDir}/qBittorrent/config/qBittorrent.conf"."C+" = mkIf (cfg.serverConfig != { }) {
mode = "600";
inherit (cfg) user group;
argument = toString configFile;
};
};
};
services.qbittorrent = {
@@ -176,6 +171,12 @@ in
Type = "simple";
User = cfg.user;
Group = cfg.group;
# the config file has to be writable, so we have to do this weird dance
ExecStartPre = lib.mkIf (cfg.serverConfig != { }) ''
${pkgs.coreutils}/bin/install -Dm600 ${configFile} "${cfg.profileDir}/qBittorrent/config/qBittorrent.conf"
'';
ExecStart = utils.escapeSystemdExecArgs (
[
(getExe cfg.package)