aria2: add systemd service
This commit is contained in:
parent
41e6e2ab37
commit
eb6f347055
3 changed files with 48 additions and 0 deletions
|
|
@ -1,4 +1,8 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{
|
||||
aria2-disabled = ./disabled.nix;
|
||||
aria2-settings = ./settings.nix;
|
||||
}
|
||||
// lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
|
||||
aria2-systemd = ./systemd.nix;
|
||||
}
|
||||
|
|
|
|||
25
tests/modules/programs/aria2/systemd.nix
Normal file
25
tests/modules/programs/aria2/systemd.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
programs.aria2 = {
|
||||
enable = true;
|
||||
package = config.lib.test.mkStubPackage { outPath = "@aria2@"; };
|
||||
systemd.enable = true;
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContent \
|
||||
home-files/.config/systemd/user/aria2.service \
|
||||
${builtins.toFile "aria2.service" ''
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
||||
[Service]
|
||||
ExecStart=@aria2@/bin/dummy --enable-rpc
|
||||
Restart=on-failure
|
||||
|
||||
[Unit]
|
||||
Description=Aria2c daemon
|
||||
Documentation=man:aria2c(1)
|
||||
''}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue