create user service for ariang
This commit is contained in:
parent
91eb5281a3
commit
6d13645d29
1 changed files with 30 additions and 13 deletions
|
@ -4,11 +4,11 @@
|
|||
secrets,
|
||||
...
|
||||
}: {
|
||||
systemd.user.services.aria2c = {
|
||||
systemd.user.services = {
|
||||
ariang = {
|
||||
Unit = {
|
||||
Description = "Aria2c Download Manager";
|
||||
Documentation = ["man:aria2c(1)"];
|
||||
After = ["network.target"];
|
||||
Description = "AriaNg: Web frontend for aria2c";
|
||||
After = ["network.target" "aria2c.service"];
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["default.target"];
|
||||
|
@ -16,8 +16,25 @@
|
|||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = ''
|
||||
${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}"
|
||||
${pkgs.merecat}/bin/merecat -n -p 6801 "${pkgs.ariang}/share/ariang"
|
||||
'';
|
||||
};
|
||||
};
|
||||
aria2c = {
|
||||
Unit = {
|
||||
Description = "Aria2c Download Manager";
|
||||
Documentation = ["man:aria2c(1)"];
|
||||
After = ["network.target"];
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["default.target" "ariang.service"];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = ''
|
||||
${pkgs.aria}/bin/aria2c --console-log-level=warn --log-level=notice --enable-rpc --rpc-secret="${secrets.aria2_config.rpc_secret}" --rpc-listen-port=6800 --rpc-allow-origin-all --dir="${config.xdg.userDirs.download}"
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue