Nixos-rebuild switch doesnt work from github

I’ve trying to setup a new nix config on my VM. While, yesterday the config was working. Today it doesnt anymore

I am not sure where the problem is, building directly from /etc/nixos does work (no error whatsoever). However, once i try to point it to my github (it has the exact same config) it output some errors.

error:
       … while calling the 'seq' builtin
         at /nix/store/45bzbkwnyb6nikgc7jkrn7vjibhy4xhk-source/lib/modules.nix:334:18:
          333|         options = checked options;
          334|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          335|         _module = checked (config._module);

       … while evaluating a branch condition
         at /nix/store/45bzbkwnyb6nikgc7jkrn7vjibhy4xhk-source/lib/modules.nix:273:9:
          272|       checkUnmatched =
          273|         if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [] then
             |         ^
          274|           let

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: access to absolute path '/nix/store/home' is forbidden in pure evaluation mode (use '--impure' to override)

Thank you

Note : Yesterday my repo wasnt possible to clone it using SSH. Now its possible. Maybe it caused some issues?

What exact command are you using? Can you share the github repo?

Could you share your *.nix? Are you using flakes? We need more information about what you are trying to do.

Simple “sudo reboot” fixes all of my problems. Not sure how the bug happened and then fixed itself. However, i am not satisfied with this solution. I will dig deeper and see if i know what the exact problem.

sudo nixos-rebuild switch --flake github:CakZemprongzz/cak-nixos-conf#nixos-test

That is the command that i used

This is the repo.

I am using flakes and home-manager. I am still to nix and try to still setting up my stuff first on VM. The progress is real slow tho.

I am was trying to install libreoffice and trying to modularize the firewall and system pkgs config which is under modules folder.

I already delete the commit because i thought that is the one that causing issues.

We can’t troubleshot code that doesn’t exist. If you’ve removed the code that caused it, we can’t see what’s wrong with it.

But in general, if you’re using flakes, always use relative paths that stay within the flake. Probably you used an incorrect path somewhere.

1 Like

The code still exist on the github.

The same config that i report to this forum is still exist in github. I am not removing it because i know it will be hard for people to help me. I am just removing the part where i thought it was causing problem and turns out its not a culprit after i tried to go back to yesterday commit where everything is fine. It still has the problem on the yesterday commit.

However now its fixed with simple reboot. I am not sure why it happened nor if this is the right solution. I will keep this forum updated.