2020-04-28 18:38:41 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
config = {
|
|
|
|
programs.aria2 = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
listen-port = 60000;
|
|
|
|
dht-listen-port = 60000;
|
|
|
|
seed-ratio = 1.0;
|
|
|
|
max-upload-limit = "50K";
|
|
|
|
ftp-pasv = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
extraConfig = ''
|
|
|
|
# Extra aria2 configuration.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2021-09-26 09:08:45 +00:00
|
|
|
test.stubs.aria2 = { };
|
2020-04-28 18:38:41 +00:00
|
|
|
|
|
|
|
nmt.script = ''
|
|
|
|
assertFileContent \
|
|
|
|
home-files/.config/aria2/aria2.conf \
|
|
|
|
${
|
|
|
|
pkgs.writeText "aria2-expected-config.conf" ''
|
|
|
|
dht-listen-port=60000
|
|
|
|
ftp-pasv=true
|
|
|
|
listen-port=60000
|
|
|
|
max-upload-limit=50K
|
|
|
|
seed-ratio=1.000000
|
|
|
|
# Extra aria2 configuration.
|
|
|
|
''
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|