Armagetronad working only working after adding it as user package

Hi you all - this is not a real issue, I’d just love to understand what is going on here.
I’m using NixOS now since about a month or so on my main machine. I use a flake and install most stuff as system packages.
I use git to version my whole flake stuff, and just edit the flakes and update with “nix flake update” and “nixos-rebuild switch --flake nixflake”.
Everything was super smooth so far, needed some time to figure everything out but always found the answers I needed somewhere. However, now I have a weird “issue” with the armagetronad package.
It was working until last week or so. Then suddenly I got an error about some build failure. As this is not quite a very important package, I threw it out of my flake and everything was fine.
Now I tried to add it back in, which still gave that error. I added it in my home-manager as user package, that worked. And now I wanted to reproduce the error messages and went back to the configuration with armagetronad as system package (without having it in the user packages of course). And now it worked flawlessly.
How is this even possible? In my understanding the behaviour with the exact same version of the (not working) flake (git versioned) should lead to the exact same behaviour of the build and resulting system. Is it because I have successfully build the package as user package?
I’m just curious how that all is as it is to learn how to work around this type of problem in the future.

Are you using the same channel for both your home-manager and flake configuration? If you are using unstable on either and especially the configuration.nix then it is expected for things to break from time to time as you run nix flake update.

1 Like

Thank you for the answer.
I use the 23.11 release, not unstable; this is at least what I wanted to configure, can I somehow confirm the source for a packet? I didn’t expect anything to break by not being able to build to be honest…
For home-manager i use github:nix-community/home-manager/release-23.11. But inputs.nixpkgs.follows is set to the 23.11 packages, so the packets should be the same, right?
I have my configuration here: GitHub - argemanmb/nixcon: my nix configuration. It is a bit of a mess, so maybe there’s something wrong with my configuration, but then there’s a misunderstanding on my side how the package sources work in the nix-files and modules.
The machine that had the issues is “nobelnix”, I didn’t try it on anything else yet (and don’t want to until my internet is usable again, right now only my phone is online).

Here I am again, some more information:
I created a branch in my configuration only to trigger the issue. If you checkout the branch GitHub - argemanmb/nixcon at armagetronIssue in a vm and do a “nixos-rebuild switch --flake nixconpath”, it won’t build. But if you do a “nix shell nixpkgs#armagetronad” and try the same, it will succeed just fine.
Why? How can that be?