36 lines
907 B
Nix
36 lines
907 B
Nix
{
|
|
name = "rsync";
|
|
nodes = {
|
|
|
|
server = { pkgs, ... }: {
|
|
imports = [ ../nixos-modules/systemd.nix ../nixos-modules/hardware.nix ];
|
|
networking.interfaces.eth1.genode.stack = "lwip";
|
|
services.rsyncd = {
|
|
enable = true;
|
|
settings.root.path = "/";
|
|
};
|
|
systemd.services.rsyncd.genode = {
|
|
enable = true;
|
|
interface = "eth1";
|
|
};
|
|
};
|
|
|
|
client = { pkgs, ... }: {
|
|
imports = [ ../nixos-modules/hardware.nix ../nixos-modules/shell.nix ];
|
|
genode.shells.rsync = {
|
|
environmentVariables.PATH = with pkgs; [ "${rsync}/bin" ];
|
|
nic = "eth1";
|
|
script = "rsync -rvvv 192.168.1.2::";
|
|
};
|
|
};
|
|
|
|
};
|
|
|
|
testScript = ''
|
|
server.start()
|
|
server.wait_until_serial_output('lwIP Nic interface up address=192.168.1.2')
|
|
client.start()
|
|
client.wait_until_serial_output('child "rsync.shell" exited')
|
|
'';
|
|
}
|