Open haztecaso opened 1 week ago
Hi, @haztecaso!
Are you tracking nixos-unstable
or nixos-24.05
?
(Just run nix run --accept-flake-config github:nilp0inter/autofirma-nix
on my system tracking nixos-unstable
and it worked ok to me.)
Also, can you provide the version of nix
you are using?
In my case it is:
❯ nix --version
nix (Nix) 2.24.10
Hi! Thanks for your answer. My nix version is 2.18.8
.
I'm tracking nixos-24.05 but I also have unstable in my inputs for some packages.
I've tried using autofirma-nix both with nixos-24.05 and unstable, with the following input declarations, and I get the same error every time.
autofirma-nix = {
url = "github:nilp0inter/autofirma-nix/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
and
autofirma-nix = {
url = "github:nilp0inter/autofirma-nix";
inputs.nixpkgs.follows = "unstable";
};
Hi, @haztecaso.
We’ve just tried (@CesarGallego & myself) unsuccessfully to reproduce¹ the issue on a NixOS system tracking nixos-24.05
.
After reviewing the error message you provided, I think that the issue might lie somewhere else, because of the "No such file or directory" error message. This makes me think that perhaps you have added a file on your flake that is not yet under version control? If that was to be the case, just git add
the file so that it enters into the git index, and it can be copied to the nix store to be accessed by nixos-rebuild switch
. Remeber that you can identify any such file by running git status
on your flake dir.
EDIT: maybe lib.nix
is the file that has not been git add
ed.
Also, and out of an abundance of caution, make sure that you don’t invoke nixos-rebuild switch
with the --fast
flag, so that if a newer nix
version is available in the update, it is properly evaluated.
Hope that it helps, keep us posted!
¹: $ nix run --accept-flake-config github:nilp0inter/autofirma-nix
I encountered an error while trying to use autofirma-nix both with
nix run
and when importing it into my NixOS flake to use it as a NixOS module. The error I get is the same in both cases. When I run it withnix run
I get an extra warning about the substituter that I suspect may be related with the cause of the problem.The first time I ran the command it asked me if I wanted to include the substituter and signatures, I said yes to everything and the app worked without any problem. After that first run I started getting this error.
In the case of nix flakes I get the error just by adding it to my inputs, without even trying to use it anywhere. This is very weird to me, as in my mind nix is lazy, so it shouldn't try to evaluate something if I'm not using it.
Thanks a lot for the help and all the development effort!