Is it possible with nix-channel to use a channel with URL containing query parameters?
I can add it using nix-channel --add 'https://gitlab.private.com/thegroup/theproject/-/archive/main/theproject-main.tar.gz?private_token=glpat-xxx' theproject, but when I run nix-channel --update I get
unpacking channels...
error: failed to open archive: Unrecognized archive format
error: builder for '/nix/store/3gl2bmzr40xizad1k2rg435hx4dhmrnn-theproject-2QsD2up13HjCkLpWpLLz.drv' failed with exit code 1
error: build of '/nix/store/3gl2bmzr40xizad1k2rg435hx4dhmrnn-theproject-2QsD2up13HjCkLpWpLLz.drv', '/nix/store/6amsimwrlfsrvawnanqm7mrp1x75c72i-nixpkgs.drv' failed
error: program '/nix/store/f837papmpi52ljfk7yzjjbqnn06x9bdp-nix-2.6.0/bin/nix-env' failed with exit code 100
I'm guessting it's the query parameter that causes it, though I'm not certain.
Unfortunately it seems GitLab doesn't support getting to a private repo using a URL format like https://<pwd>@gitlab...., like GitHub does. So I'm at a loss here :disappointed:
I decided to start using home-manager and it effectively removed the need to get nix-channel working with GitLab directly. Instead I can use fetchGit directly.
Is it possible with nix-channel to use a channel with URL containing query parameters?
I can add it using
nix-channel --add 'https://gitlab.private.com/thegroup/theproject/-/archive/main/theproject-main.tar.gz?private_token=glpat-xxx'
theproject, but when I runnix-channel --update
I getI'm guessting it's the query parameter that causes it, though I'm not certain.
Unfortunately it seems GitLab doesn't support getting to a private repo using a URL format like
https://<pwd>@gitlab....
, like GitHub does. So I'm at a loss here :disappointed:I decided to start using home-manager and it effectively removed the need to get
nix-channel
working with GitLab directly. Instead I can usefetchGit
directly.I would recommend using flakes
Yup, I made the move to flakes too.