Get Ledger Live working on NixOS

Posted on November 14, 2019 Tags: #technology #linux

The Ledger Nano series are hardware wallets for crypto currencies. They’re managed through an application called Ledger Live. Ledger Live runs on linux but might - depending on your distro - require some adjustments in order to correctly identify the device via USB. I couldn’t test whether this config works with all Ledger devices so far. Feel free to drop me a tweet if you have anything to add to this post and I’ll gladly update it.

On NixOS I needed the following additional config snippets to use my Ledger fully:

Define a group called “plugdev”

groups.plugdev = {};

Add user(s) to “plugdev”

Note that you your user will most likely already be in various other groups such as networkmanager or wheel. Just append plugdev to the extraGroups list. Replace myUser with your user name.

users.users = {
...
  myUser = {
  extraGroups = [ "plugdev" ];
...
  };
};

Add extra rules for udev

Ledger provides udev rules which need to be added kind of hidden (linux -> Troubleshooting -> Option 3) on their website. You can check out my NixOS config containing these rules on GitHub. I’ve decided to not statically post them here and instead refer to the GitHub mirror of my NixOS config, because they might change with Ledger firmware updates. You must change “val” to your username.

I’m not entirely sure whether it’s really necessary but I reload the rules after I’ve changed them and rebuilt NixOS just to make sure they are being applied:

udevadm trigger
udevadm control --reload-rules