aria2 wrapper ignores generated config file #317
-
{
flake.wrappers.aria2 =
{
wlib,
lib,
pkgs,
config,
...
}:
let
formatLine =
n: v:
let
formatValue = v: if builtins.isBool v then (if v then "true" else "false") else toString v;
in
"${n}=${formatValue v}";
configFile = pkgs.writeText "aria2Wrapped.conf" (
lib.concatStringsSep "\n" (lib.mapAttrsToList formatLine config.settings) + "\n"
);
in
{
imports = [ wlib.modules.default ];
options = {
settings = lib.mkOption {
type =
with lib.types;
attrsOf (oneOf [
bool
float
int
str
]);
default = {
continue = true;
dir = "/home/krish/Downloads";
input-file = "/home/krish/Downloads/.aria_downloads.conf";
file-allocation = "none";
log-level = "warn";
max-connection-per-server = 4;
min-split-size = "5M";
on-download-complete = "exit";
auto-file-renaming = false;
};
description = "Settings to be wrapped with aria2 binary";
};
};
config = {
package = pkgs.aria2;
# exePath = ;
flags = {
"--conf-path" = configFile;
};
flagSeparator = "=";
};
};
}On |
Beta Was this translation helpful? Give feedback.
Answered by
BirdeeHub
Mar 2, 2026
Replies: 1 comment 5 replies
-
|
no idea, I can try it out maybe later today. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ah its not being passed to it at all
It is only wrapping
${passthru "out"}Something would need to be added to say if you want the thing in all the outputs, or specific outputs, or whatever, because right now it builds the wrapper script to "out"
In the meantime, the workaround should be something like: