mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
f32d7e4e03
Define systemd-socket activation using the upstream configuration files as a reference. The "rsyncd" systemd unit has been renamed to "rsync" for consistency with upstream.
37 lines
866 B
Nix
37 lines
866 B
Nix
import ./make-test-python.nix ({ pkgs, ... }: {
|
|
name = "rsyncd";
|
|
meta.maintainers = with pkgs.lib.maintainers; [ ehmry ];
|
|
|
|
nodes = let
|
|
mkNode = socketActivated:
|
|
{ config, ... }: {
|
|
networking.firewall.allowedTCPPorts = [ config.services.rsyncd.port ];
|
|
services.rsyncd = {
|
|
enable = true;
|
|
inherit socketActivated;
|
|
settings = {
|
|
global = {
|
|
"reverse lookup" = false;
|
|
"forward lookup" = false;
|
|
};
|
|
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::")
|
|
'';
|
|
})
|