nixpkgs/nixos/tests/rsyncd.nix
cr0n f46be21864
nixos/rsyncd: fix ini format for global section (#385064)
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
2025-04-26 17:46:51 +02:00

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::")
'';
}
)