While working with a flakes enabled nix binary I have several inputs which are private github repositories. Some of these private github repositories are already flakes, though not all. Following the advice in https://github.com/NixOS/nix/issues/3991#issuecomment-972882303 I have my personal access token included in ~/.config/nix/nix.conf and everything works well.
Due to complex compatibility/migration reasons I'm in a position where flake-compat is required. Consider the following example flake.nix:
My default.nix is a pretty standard implementation of the flake-compat example. When I try to install foo, the package provided by flake.nix, via nix-env I see a permission issue:
$ nix-env -if . outputs.packages.x86_64-linux.foo
error: unable to download 'https://api.github.com/repos/...': HTTP error 404
response body:
{
"message": "Not Found",
"documentation_url": "https://docs.github.com/rest/reference/repos#download-a-repository-archive"
}
(use '--show-trace' to show detailed location information)
Given I have an appropriate ~/.config/nix/nix.conf in place I was expecting this to work.
Any advice or help is greatly appreciated :bowing_man:
Note that if I run nix --extra-experimental-features flakes --extra-experimental-features nix-command flake show before running nix-env this pulls enough into my nix store that nix-env subsequently works. This is not a viable workaround for me, though :disappointed:
While working with a
flakes
enablednix
binary I have several inputs which are privategithub
repositories. Some of these privategithub
repositories are alreadyflakes
, though not all. Following the advice in https://github.com/NixOS/nix/issues/3991#issuecomment-972882303 I have my personal access token included in~/.config/nix/nix.conf
and everything works well.Due to complex compatibility/migration reasons I'm in a position where
flake-compat
is required. Consider the following exampleflake.nix
:My
default.nix
is a pretty standard implementation of theflake-compat
example. When I try to installfoo
, the package provided byflake.nix
, vianix-env
I see a permission issue:Given I have an appropriate
~/.config/nix/nix.conf
in place I was expecting this to work.Any advice or help is greatly appreciated :bowing_man:
Note that if I run
nix --extra-experimental-features flakes --extra-experimental-features nix-command flake show
before runningnix-env
this pulls enough into my nix store thatnix-env
subsequently works. This is not a viable workaround for me, though :disappointed: