nixpkgs/nixos/tests/rsyncd.nix
Wolfgang Walther f09f724ef8
maintainers: drop ehmry
This user is blocked since May 2025, thus can't maintain any packages
anymore.
2025-08-31 16:53:44 +02:00

43 lines
902 B
Nix

{ pkgs, ... }:
{
name = "rsyncd";
nodes =
let
mkNode =
socketActivated:
{ config, ... }:
{
networking.firewall.allowedTCPPorts = [ config.services.rsyncd.port ];
services.rsyncd = {
enable = true;
inherit socketActivated;
settings = {
globalSection = {
"reverse lookup" = false;
"forward lookup" = false;
};
sections = {
tmp = {
path = "/nix/store";
comment = "test module";
};
};
};
};
};
in
{
a = mkNode false;
b = mkNode true;
};
testScript = ''
start_all()
a.wait_for_unit("rsync")
b.wait_for_unit("sockets.target")
b.succeed("rsync a::")
a.succeed("rsync b::")
'';
}