Skip to content

Commit

Permalink
Support eduroam on IWD clients (#24)
Browse files Browse the repository at this point in the history
* moved certificate to separate file

* initial eduroam support for iwd

* flake update

* added iwd function calls

* unindented message

* made iwd and nmcli act similar

* fix small issues with gettings credentials

* updated system messages

* uppercased letter in autoconnect

* change indentation to 2 spaces

* added offline fallback for the certificate

* used fail fast with curl for better error handling

* corrected spelling and grammar

* removed awk used for profile check

* change strategy for checking state

* fixed mistake in nmcli command

* updated logic for checking network manager

* corrected spelling mistake

* corrected certificate placment

* corrected mistake in iwd profile

* moved cert to satisfy perms
  • Loading branch information
MikaelFangel authored Feb 25, 2024
1 parent 0e51b50 commit 7505f0d
Show file tree
Hide file tree
Showing 5 changed files with 279 additions and 237 deletions.
108 changes: 108 additions & 0 deletions ca_eduroam.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
-----BEGIN CERTIFICATE-----
MIIFszCCA5ugAwIBAgIQGPyTPfToyJJPRg/BlCoZMjANBgkqhkiG9w0BAQsFADBO
MQswCQYDVQQGEwJESzEmMCQGA1UEChMdRGFubWFya3MgVGVrbmlza2UgVW5pdmVy
c2l0ZXQxFzAVBgNVBAMTDkRUVSBST09UIENBIDAxMB4XDTE1MTIwMjExMDQ0OFoX
DTQwMTIwMjExMTQ0OFowTjELMAkGA1UEBhMCREsxJjAkBgNVBAoTHURhbm1hcmtz
IFRla25pc2tlIFVuaXZlcnNpdGV0MRcwFQYDVQQDEw5EVFUgUk9PVCBDQSAwMTCC
AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANDKEUG7jDTxJW9L2FeE4nV7
5ejarzkrkRz8wpmK+jpA/IqowG1yi/TDk77yastCBLnt0J7GhbUestDx27QcgpmS
kVNM3F6JAxCFSmswmtOTHRwC1Vp9q7RunVi3fH5NZB8n5d/KnRmS6qpq9xoNxR+1
B+J1dd5EopqfYynwCimyYdXVmuJSeRC/mLm7N5/8PPiggrQSboHc1hA1S63s4oow
ME7mFogdS5tn4k+TBgT75q48zGEz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KpdZJqjX8h0AubIiVQT+WEVIXLXWYqzLjHKZAOPjh3/c1wXnpfcupMiqUfHyW
PuyQuWk3e2ffD8fqQkXmm5kGhxnYRVwdjBRI1OgwHu+g9y+aMPxDjy6UV9dszbzG
rzp0WUfYP5Po5Q20WisuSP2cslCLWEA1puJ9eoQbolX0lU4akir2+BeeFOymJ4Zr
0sJDV07NiJFQek0KvYQTJ2AoHomSxuMK4JnovfUy5CkSv/c79TT4YCM+j/XMvktT
7JNMhw7RI/+pNLksDDp4G2y4sUR8F6rP9taHfNbrf9hCei7e6+ZV9iP2esWGRy0m
9soeZ0I6PdnFowhlIPI9IiL5oJn9MSS/IS8kJtQi+GEJAZi1skMQwe1JPKdwBlMX
6+N4zcymRlFSxzP9Ff9zsc4eOyw6VrKuVol+5+YzOFC1mjpTrKmNsnQoyLPbaDM+
iLI/+waFbFu1yqTnfOuue/P8+TEfujz/4bwZq3s25mLQH/puEI7ueb1XTxVcJzj6
GF8PvBE+A6iD8oAg+h+3AqsWqGp+3Lr1kGK/5JKw2CXV3SwA3v827uOQ731lwbTK
wQA2RQg=
-----END CERTIFICATE-----
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
buildInputs = builtins.attrValues { inherit (pkgs) gawk ; };

installPhase = ''
install -Dm 755 "iwd.sh" "$out/bin/iwd.sh"
install -Dm 755 "setup.sh" "$out/bin/dtuconnect"
'';

Expand Down
42 changes: 0 additions & 42 deletions iwd.sh

This file was deleted.

Loading

0 comments on commit 7505f0d

Please sign in to comment.