2023-05-18 16:11:26 +05:30
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
2023-07-09 17:03:38 +05:30
|
|
|
secrets,
|
2023-05-18 16:11:26 +05:30
|
|
|
...
|
|
|
|
}: {
|
2023-05-13 00:31:26 +05:30
|
|
|
systemd.user.services.aria2c = {
|
|
|
|
Unit = {
|
|
|
|
Description = "Aria2c Download Manager";
|
2023-05-18 16:11:26 +05:30
|
|
|
Documentation = ["man:aria2c(1)"];
|
|
|
|
After = ["network.target"];
|
2023-05-13 00:31:26 +05:30
|
|
|
};
|
|
|
|
Install = {
|
2023-05-18 16:11:26 +05:30
|
|
|
WantedBy = ["default.target"];
|
2023-05-13 00:31:26 +05:30
|
|
|
};
|
|
|
|
Service = {
|
|
|
|
Type = "simple";
|
|
|
|
ExecStart = ''
|
2023-07-09 17:03:38 +05:30
|
|
|
${pkgs.aria}/bin/aria2c --console-log-level=warn --log-level=notice --enable-rpc --rpc-secret="${secrets.aria2_config.rpc_secret}" --rpc-listen-all --rpc-listen-port=6800 --dir="${config.xdg.userDirs.download}"
|
2023-05-13 00:31:26 +05:30
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|