create user service for ariang

This commit is contained in:
Adithya 2023-07-09 22:14:29 +05:30
parent 91eb5281a3
commit 6d13645d29
Signed by: adtya
GPG key ID: 48FC9915FFD326D0

View file

@ -4,20 +4,37 @@
secrets, secrets,
... ...
}: { }: {
systemd.user.services.aria2c = { systemd.user.services = {
Unit = { ariang = {
Description = "Aria2c Download Manager"; Unit = {
Documentation = ["man:aria2c(1)"]; Description = "AriaNg: Web frontend for aria2c";
After = ["network.target"]; After = ["network.target" "aria2c.service"];
};
Install = {
WantedBy = ["default.target"];
};
Service = {
Type = "simple";
ExecStart = ''
${pkgs.merecat}/bin/merecat -n -p 6801 "${pkgs.ariang}/share/ariang"
'';
};
}; };
Install = { aria2c = {
WantedBy = ["default.target"]; Unit = {
}; Description = "Aria2c Download Manager";
Service = { Documentation = ["man:aria2c(1)"];
Type = "simple"; After = ["network.target"];
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}" 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}"
'';
};
}; };
}; };
} }