config/modules/nm-vdns-auto/default.nix

17 lines
360 B
Nix
Raw Normal View History

2022-02-05 21:42:36 +02:00
{ pkgs, config, ... }:
{
networking.networkmanager.dispatcherScripts = [{
source = pkgs.writeShellScript "vdns.sh" ''
[[ "$2" != "up" ]] && exit 0
case $1 in
wl*|en*)
sleep 0.5;
${pkgs.networkmanager}/bin/nmcli c up vDNS;;
esac
exit 0
'';
type = "basic";
}];
}