I have started using flakes to manage system configuration a few months ago and it’s been going great. Today, I was creating a custom package which borked by nix store (my fault entirely). So I tried some commands to garbage collect and the system started working, but
nixos-rebuild switch --flake .# did nothing (even when I changed various configs). I thought that the nix store broke and decided to create a new vm and installed a fresh copy of nixos. During nixos-install, I commented the home manager setup since it has some issues with new install and flakes. The install went great but when I logged in normally and issued rebuild-switch again, nothing happened again. No amount of changes in the config (either committed or dirty) resulted in action. The options -v or --show-trace also shows nothing.
I’m not sure what’s wrong, my config is here GitHub - addy419/configurations
What exactly do you mean by “did nothing”?
What is the exit code when you try to rebuild?
Does it only happen on
switch or can you use
boot without issues?
What is your version of nix? What are the last ~10 lines when running using
No, neither boot nor build work. rebuild switch with verbose shows no output (just that the config is dirty)
journal ctl (I’m sorry, the virtualbox clipboard sharing is not setup in new vm) shows
Nix version is 2.4pre20210802_47e96bb
As far as I understand, the hardest part is to find where the attributes are missing…
After I removed the mkDerivation, It started working. Someone described it as segfault when mkDerivation has no name attribute, I’ll recheck by adding a name attribute segmentation fault in `libnixexpr.so` when derivation has no `name` attribute · Issue #5113 · NixOS/nix · GitHub
So I can only find this one
mkDerivation in your code, and indeed, it is missing the
Yes, adding name fixed the segfault. Thank you for the help.