1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

feat(networking): add 36C3

This commit is contained in:
Kierán Meinhardt
2019-12-27 11:41:11 +01:00
parent a4257aac68
commit b5041fb44b
2 changed files with 36 additions and 0 deletions

34
configs/ccc.nix Normal file
View File

@@ -0,0 +1,34 @@
{ pkgs, ... }:
# https://paste.sr.ht/~erictapen/11716989e489b600f237041b6d657fdf0ee17b34
let
certificate = pkgs.stdenv.mkDerivation rec {
name = "dst-root-ca-x3.pem";
src = builtins.toFile "${name}.awk" ''
{
if(a > 0) { print }
}
/-----END CERTIFICATE-----/ { a = 0 }
/DST Root CA X3/ { a = 1 }
'';
nativeBuildInputs = with pkgs; [ cacert gawk ];
phases = "installPhase";
installPhase = ''
${pkgs.gawk}/bin/awk -f $src ${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt > $out
'';
};
in
{
networking.wireless.networks."36C3" = {
auth = ''
key_mgmt=WPA-EAP
eap=TTLS
identity="kmein"
password=" "
ca_cert="${certificate}"
altsubject_match="DNS:radius.c3noc.net"
phase2="auth=PAP"
'';
};
}