forked from aylac.top/nixcfg
this repo has no description
1{ 2 pkgs, 3 lib, 4 config, 5 ... 6}: { 7 options.myNixOS.services.aria2 = { 8 enable = lib.mkEnableOption "Aria2 service"; 9 }; 10 11 config = lib.mkIf config.myNixOS.services.aria2.enable { 12 systemd.user.services.aria2 = { 13 description = "aria2 daemon"; 14 after = ["network.target"]; 15 wantedBy = ["default.target"]; 16 serviceConfig = { 17 ExecStart = "${pkgs.aria2}/bin/aria2c --enable-rpc --rpc-listen-all --rpc-allow-origin-all --dir=%h/Downloads"; 18 Restart = "always"; 19 RestartSec = "10"; 20 Type = "forking"; 21 WorkingDirectory = "%h"; 22 Environment = "HOME=%h"; 23 }; 24 }; 25 }; 26}