initial commit

master
Rachel Lambda Samuelsson 2023-07-25 13:43:38 +02:00
commit af73b473e8
2 changed files with 29 additions and 0 deletions

22
eduroam.nix 100644
View File

@ -0,0 +1,22 @@
{ pkgs ? import <nixpkgs> {}, ... }:
let eduroam = pkgs.fetchurl {
name = "eduroam";
url = "https://cat.eduroam.org/user/API.php?action=downloadInstaller&lang=en&profile=973&device=linux&generatedfor=user&openroaming=0";
hash = "sha256-/NptbjDU1SZUHQM2TvuOgd62S4tZYsTFHuHc0XxaF4s=";
recursiveHash = true;
downloadToTemp = true;
postFetch = ''
mkdir -p "$out/bin"
install -m 755 "$downloadedFile" "$out/bin/eduroam.py"
'';
};
in pkgs.mkShell {
packages = [
eduroam
(pkgs.python3.withPackages (ps: with ps; [ dbus-python pyopenssl ]))
];
shellHook = ''
exec python3 ${eduroam}/bin/eduroam.py
'';
}

7
readme.md 100644
View File

@ -0,0 +1,7 @@
# chalmers eduroam nix
This is a nix-shell which automatically fetches the chalmers eduroam configuration tool, the needed python packages, and runs the scipt.
You should already have network manager enabled in your global config.
If you want it to work with another institution then find the correct download link from [cat.eduoroam.org](https://cat.eduroam.org/) and adjust the url and hash in `eduroam.nix` accordingly.