feat(networking): auto-login for Deutsche Bahn WiFi portals
Some checks failed
Test / tests (push) Failing after 25m51s

This commit is contained in:
Felix Schröter 2025-07-21 21:21:38 +02:00
parent 576ddc0d69
commit b5341635d9
Signed by: felschr
GPG key ID: 671E39E6744C807D

View file

@ -119,4 +119,20 @@ in
dig
wireguard-tools
];
networking.networkmanager.dispatcherScripts = [
{
#!/usr/bin/env bash
source = pkgs.writeText "connect_ice" ''
set -euxo pipefail
ACTION="$2"
if [[ "$ACTION" == "up" ]]; then
if [[ "$CONNECTION_ID" =~ "WIFIonICE|WIFI@DB" ]]; then
${pkgs.curl}/bin/curl 'https://login.wifionice.de/cna/logon' -sSL -X POST
fi
fi
'';
type = "basic";
}
];
}