Skip to content

Instantly share code, notes, and snippets.

@domenkozar
Created September 20, 2021 09:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save domenkozar/885755fbad2b45d4f7096f120ac3fad3 to your computer and use it in GitHub Desktop.
Save domenkozar/885755fbad2b45d4f7096f120ac3fad3 to your computer and use it in GitHub Desktop.
Nix and e-residency setup chromium
wget -O ESTEID-SK_2015.pem.crt https://www.sk.ee/upload/files/ESTEID-SK_2015.pem.crt
nix-shell -p nssTools --run "certutil -d sql:$HOME/.pki/nssdb -A -t ",," -n "ESTEID-SK_2015" -i ESTEID-SK_2015.pem.crt"
nix-shell -p nssTools --run "modutil -force -dbdir sql:$HOME/.pki/nssdb -delete opensc-pkcs11"
nix-shell -p nssTools --run "modutil -force -dbdir sql:$HOME/.pki/nssdb -add opensc-pkcs11 -libfile $(nix-build -A opensc '<nixpkgs>' --no-out-link)/lib/onepin-opensc-pkcs11.so -mechanisms FRIENDLY"
mkdir -p ~/.config/chromium/NativeMessagingHosts
cp $(nix-build -A chrome-token-signing '<nixpkgs>')/etc/chromium/native-messaging-hosts/ee.ria.esteid.json ~/.config/chromium/NativeMessagingHosts/ee.ria.esteid.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment