How to fetchurl with credentials

This is solved using Enterprise - NixOS Wiki.

# /etc/nix/netrc
machine DOMAINNAME
    login USERNAME
    password SECRET

for something like private github repos, you would do:

machine github.com
    password TOKEN
1 Like