so, /etc/nixos/configuration.nix is overwritten? Unless you did any backups, you’re in trouble NixOS doesn’t backup that file for you.
As for your issue - it is more of a warning, not a failed switch. rebuild switch consists of 2 phases - build and activate, and error just says some services were not activated. But it should take brackets out of system-wide installment.
fact - brackets is not in the current failed switch configuration but I can open it with sudo brackets.
I cannot see that the switch worked because the is no now generation (and switch -p “name” is not the either)
idenpended of all env-Vars the exitcode is always 1 (but Segmentation fault (core dumped) is ecitcode 139).
if I execute brackets → 139, if I excecute nix run -f '<nixpkgs>' -i brackets --keep PATH -c brackets it is 1 [permission denied]
brackets is not anymore in the current configuration.nix file but as you see, the system has kept it.
do I have to garbage collect or so ?
(there are some stange things on this nixos system - e.g. DHCP is set to false but now and then after bootup it permanetly tries and fails to setup dhcp!?)
NixOS has some hacks to make sudo behave a bit different. If you have a package installed only as a user, then sudo brackets will run your user’s binary, not root’s. Try to sudo su - and then run brackets – it should be absent.
yes, but… Would you like to find out which envvar causes segfault?
the -i --keep PATH makes your environment pristine, clear
segfault is not reproduced in this clear environment, so it must be some environment variable causes it. Be it QT, or locale, or LD_*, or drivers, or XDG_* or whatnot - you have to figure out, as this is “impurity”, a thing we try to avoid in Nix/NixOS
You have network manager – maybe it tries to dhcp?
This indicates nothing had changed. Dummy rebuild, when this happens switch does only activate step.
dummy rebuild - mh ok. I will take care about that.
according to the error theit will be no new generation created:
Jun 18 09:08:00 nixos nixos[12970]: switching to system configuration /nix/store/jwxq8lpb8jg58vakld6sn4sx2c50xssb-nixos-system-nixos-20.03.2157.db31e48c5c8 failed (status 4)
I have network manager – but why does it tries to dhcp if it is set to false? Should I use something else/better (what alternatives are there in nixos)?
you are right, with su there is no brackets
I tested all vars additionally to PATH (via python subprocess) and all have exiscode 1, so the permission issue.
I’m not sure if I understood how to test it the right way
– if I only add --keep PATH it end with the error - I would expect that this most simple scenario shurt run, no?
Ok, I see that there are too many variables required to actually run brackets. I don’t actually know how to help here, maybe you should write a script which tried all combinations of variables in loop and tests if brackets actually starts with those vars…
correct, but note also that I use XFCE desktop manager, and you may be using a different one and you may use different drivers, so our environment even if both installed “cleanly” have some differences.