mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
Quote from NixOS 25.11 release notes:
> `meta.mainProgram` is now used to determine the `NIX_MAIN_PROGRAM` environment variable. This means that changing it can now lead to a package rebuild.
And `netcat` is:
```
netcat = libressl.nc.overrideAttrs (old: {
meta = old.meta // {
description = "Utility which reads and writes data across network connections — LibreSSL implementation";
mainProgram = "nc";
};
});
```
`netcat` and `libressl.nc` are 2 different derivations now, use just one
of them in nixpkgs for consistency.
This also fixes lots of warnings if `virtualisation.libvirtd.enable = true`:
```
pkgs.buildEnv warning: colliding subpath (ignored): `/nix/store/1mcayh9rmxmjcbmm6swkkyr59rjl66vc-libressl-4.2.1-nc/bin/nc' and `/nix/store/x1vmfpisbd494yykmvjkhvh3dplsnjhg-libressl-4.2.1-nc/bin/nc'
...
```
47 lines
997 B
Nix
47 lines
997 B
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
name = "samba-wsdd";
|
|
meta.maintainers = with pkgs.lib.maintainers; [ izorkin ];
|
|
|
|
nodes = {
|
|
client_wsdd =
|
|
{ pkgs, ... }:
|
|
{
|
|
services.samba-wsdd = {
|
|
enable = true;
|
|
openFirewall = true;
|
|
interface = "eth1";
|
|
workgroup = "WORKGROUP";
|
|
hostname = "CLIENT-WSDD";
|
|
discovery = true;
|
|
extraOptions = [ "--no-host" ];
|
|
};
|
|
};
|
|
|
|
server_wsdd =
|
|
{ ... }:
|
|
{
|
|
services.samba-wsdd = {
|
|
enable = true;
|
|
openFirewall = true;
|
|
interface = "eth1";
|
|
workgroup = "WORKGROUP";
|
|
hostname = "SERVER-WSDD";
|
|
};
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
client_wsdd.start()
|
|
client_wsdd.wait_for_unit("samba-wsdd")
|
|
|
|
server_wsdd.start()
|
|
server_wsdd.wait_for_unit("samba-wsdd")
|
|
|
|
client_wsdd.wait_until_succeeds(
|
|
"echo list | ${pkgs.netcat}/bin/nc -N -U /run/wsdd/wsdd.sock | grep -i SERVER-WSDD"
|
|
)
|
|
'';
|
|
}
|