I am running 21.11, and bspwm as my window manager. I recently made an edit in home.nix to my polybar configuration. After running home-manager switch, my X display began flickering, randomly, constantly, about 1-2 times every 1-2 seconds. It appears like a black window with no decorations is being drawn over the entire display except a row maybe 20 pixels along the top border.
I have confirmed that it is X, because if I drop down to a TTY, there is no flickering. Also, if I connect an external display, that display is fine, but my internal laptop display continues to flicker.
I don’t think it is related to my polybar config, because I stopped it with a systemctl --user stop polybar.service and the flickering continues.
edit: I switched back one generation (2022-03-03) and the problem persisted. I switched back one more generation (2022-02-07) and the problem cleared up. How can I determine which package messed things up.
p.s. During boot, in the systemd boot loader, I switched to generation 151. But when I run `sudo nix-env --list-generations --profile /nix/var/nix/profiles/system’, it shows generation 152 as current. Why is that?
If you switch into a non-default generation, it won’t match… with the default generation (called “current” by nix-env). EDIT: perhaps it’s unclear that the choice is the boot menu is not a persistent one.
Follow-up question: If I select a non-default generation at boot, how can I query the system to tell me which generation was used at boot? Since --list-generation shows me the default, and not the currently loaded one. Terminilogy here leads to confusion obviously.
Second follow-up question: Running sudo nixos-rebuild --upgrade switch updates my channel, updates packages and switches to the new generation, but is there a way to list the packages that will be updated before commiting? Also, is there a way to query the channel to see if there are any package updates?
The issue is clearly “solved”, but for reference and completeness, the nix subcommands exist since nix 2.4. They’re experimental and behind a feature flag by default (experimental-features = nix-command flakes in nix.extraOptions).
Sorry for sending you down a wild goose chase there, I’m usually more careful about pointing at experimental features. Guess I was just a bit excited upon realizing how useful that command is for bisecting
No problem. Actually the problem has been identified as an issue with picom. I don’t know the particulars, don’t know if it is Nix specific, and don’t know the solution other than to temporarily disable picom.
Then, for fun, we went down a bunch of unrelated rabbit holes.