mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
Merge pull request #321987 from thiagokokada/rtorrent-add-hardening
nixos/rtorrent: add systemd hardening configuration
This commit is contained in:
commit
30c578e589
4 changed files with 59 additions and 2 deletions
|
@ -824,6 +824,7 @@ in {
|
|||
rstudio-server = handleTest ./rstudio-server.nix {};
|
||||
rsyncd = handleTest ./rsyncd.nix {};
|
||||
rsyslogd = handleTest ./rsyslogd.nix {};
|
||||
rtorrent = handleTest ./rtorrent.nix {};
|
||||
rxe = handleTest ./rxe.nix {};
|
||||
sabnzbd = handleTest ./sabnzbd.nix {};
|
||||
samba = handleTest ./samba.nix {};
|
||||
|
|
25
nixos/tests/rtorrent.nix
Normal file
25
nixos/tests/rtorrent.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
import ./make-test-python.nix ({ pkgs, ... }:
|
||||
let
|
||||
port = 50001;
|
||||
in
|
||||
{
|
||||
name = "rtorrent";
|
||||
meta = {
|
||||
maintainers = with pkgs.lib.maintainers; [ thiagokokada ];
|
||||
};
|
||||
|
||||
nodes.machine = { pkgs, ... }: {
|
||||
services.rtorrent = {
|
||||
inherit port;
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = /* python */ ''
|
||||
machine.start()
|
||||
machine.wait_for_unit("rtorrent.service")
|
||||
machine.wait_for_open_port(${toString port})
|
||||
|
||||
machine.succeed("nc -z localhost ${toString port}")
|
||||
'';
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue