mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 20:25:32 +03:00

According to the manpage the rsyncd.conf has a global section without a module header. Settings for listening port or bind address must be put there and will not work if defined in a global submodule (i.e. below a "[global]" header). This commit changes the ini format generator for the rsyncd service to allow a global section in the config file without a submodule header. Fixes #304293 Credits to @nydragon * remove retrocompat, add incompat release notes
45 lines
1.1 KiB
Nix
45 lines
1.1 KiB
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 = {
|
|
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::")
|
|
'';
|
|
}
|
|
)
|