Hello there I am trying to replicate this flake: Icy-Thought/snowflake: A repository which contains my current Nix (flake-based) setup! - Codeberg.org on an almost fresh copy of nixos (only 6 generations so far). After much debugging I managed to get the flake to a state where it would build successfully with no errors (only a few warnings which I presume are harmless):
Figure 1:
nixos-rebuild switch --use-remote-sudo --flake .#probook-445g6 --impure
warning: Git tree '/home/rudra/Workspace/public/snowflake' is dirty
building the system configuration...
warning: Git tree '/home/rudra/Workspace/public/snowflake' is dirty
evaluation warning: getExe: Package "ibus-1.5.31" does not have the meta.mainProgram attribute. We'll assume that the main program has the same name for now, but this behavior is deprecated, because it leads to surprising errors when the assumption does not hold. If the package has a main program, please set `meta.mainProgram` in its definition to make this warning go away. Otherwise, if the package does not have a main program, or if you don't control its definition, use getExe' to specify the name to the program, such as lib.getExe' foo "bar".
evaluation warning: getExe: Package "ibus-1.5.31" does not have the meta.mainProgram attribute. We'll assume that the main program has the same name for now, but this behavior is deprecated, because it leads to surprising errors when the assumption does not hold. If the package has a main program, please set `meta.mainProgram` in its definition to make this warning go away. Otherwise, if the package does not have a main program, or if you don't control its definition, use getExe' to specify the name to the program, such as lib.getExe' foo "bar".
[sudo] password for rudra:
updating GRUB 2 menu...
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
lsblk: /dev/mapper/no*[0-9]: not a block device
lsblk: /dev/mapper/block*[0-9]: not a block device
lsblk: /dev/mapper/devices*[0-9]: not a block device
lsblk: /dev/mapper/found*[0-9]: not a block device
activating the configuration...
setting up /etc...
reloading user units for rudra...
restarting sysinit-reactivation.target
the following new units were started: NetworkManager-dispatcher.service
Done. The new configuration is /nix/store/1kwshqd1cd71lrfzs5anpq7k96lnv4k8-nixos-system-probook-445g6-25.05.20250417.b024ced
Figure 2:
nixos-rebuild boot --use-remote-sudo --flake .#probook-445g6 --impure
warning: Git tree '/home/rudra/Workspace/public/snowflake' is dirty
building the system configuration...
warning: Git tree '/home/rudra/Workspace/public/snowflake' is dirty
evaluation warning: getExe: Package "ibus-1.5.31" does not have the meta.mainProgram attribute. We'll assume that the main program has the same name for now, but this behavior is deprecated, because it leads to surprising errors when the assumption does not hold. If the package has a main program, please set `meta.mainProgram` in its definition to make this warning go away. Otherwise, if the package does not have a main program, or if you don't control its definition, use getExe' to specify the name to the program, such as lib.getExe' foo "bar".
evaluation warning: getExe: Package "ibus-1.5.31" does not have the meta.mainProgram attribute. We'll assume that the main program has the same name for now, but this behavior is deprecated, because it leads to surprising errors when the assumption does not hold. If the package has a main program, please set `meta.mainProgram` in its definition to make this warning go away. Otherwise, if the package does not have a main program, or if you don't control its definition, use getExe' to specify the name to the program, such as lib.getExe' foo "bar".
updating GRUB 2 menu...
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
lsblk: /dev/mapper/no*[0-9]: not a block device
lsblk: /dev/mapper/block*[0-9]: not a block device
lsblk: /dev/mapper/devices*[0-9]: not a block device
lsblk: /dev/mapper/found*[0-9]: not a block device
Done. The new configuration is /nix/store/1kwshqd1cd71lrfzs5anpq7k96lnv4k8-nixos-system-probook-445g6-25.05.20250417.b024ced
Almost identical to figure 1.
Both figures show absolutely no sign of any errors / problems / issues which is what really confuses me.
Anyway when I reboot rather than seeing a 7th generation with icy-thought’s amazing snowflake flake. I see only gnerations 1 to 6.
My first thought was maybe issue with bootloader so I found https://wiki.nixos.org/wiki/Bootloader and started following it. I determined that my system is UEFI with [ -d /sys/firmware/efi/efivars ] && echo "UEFI" || echo "Legacy"
No surprises there!
Then i read:
Limiting amount of entries with grub or systemd-boot
The grub and systemd-boot modules has an option to limit the number of configurations made available in the boot partition,
boot.loader.grub.configurationLimit
orboot.loader.systemd-boot.configurationLimit
. Setting this to a lower amount than the default may help reduce the occasions where too many different kernels and initrds are added to the /boot partition or ESP.
and confirmed neither of those two options is even present anywhere (the flake uses GRUB btw.)
Then I read:
Re-installing the bootloader
- Something happened, and the bootloader doesn’t work as expected.
- The ESP was re-made and nothing was kept.
- The ESP wasn’t mounted and I want to re-generate the menu entries.
From a running system
sudo nixos-rebuild --install-bootloader boot
So I tried nixos-rebuild boot --use-remote-sudo --flake .#probook-445g6 --impure --install-bootloader
and
nixos-rebuild switch --use-remote-sudo --flake .#probook-445g6 --impure --install-bootloader
Both very successfull yet after reboot no change
Anyway then I read:
New generations are not in the boot menu
The most common cause for this situation is when the ESP isn’t mounted where NixOS expects it to be on UEFI systems. NixOS assumes the ESP is mounted under /boot
and that it is on the ESP that NixOS will install the files needed for the boot process for UEFI systems.[1] This issue should affect all supported UEFI bootloaders equally for NixOS.
The usual fix for this problem is to add the missing entry for fileSystems."/boot"
in hardware-configuration.nix
(or where your mount points are defined).
If for some reason it is impossible to boot the existing generations, follow the steps in #Re-installing the bootloader to re-generate the menu entries, then boot in your system to add the missing configuration. The next generations should work as expected in your bootloader.
I sanity checked myself and yes fileSystems."/boot"
is configured correctly with correct UUID shown in lsblk -f and everything. So as it recommended I re-tryed re-installing the bootloader, same story still though!
So now I’m unsure what the next steps I should take to troubleshoot this are, if you can provide guidance or point me to more helpful resources. I’d highly appreciate it .
Anyways sorry if that was a bit ranty its just I really like the flake and would be overjoyed to get it successfully reproduced.
PS: Here is the github repo of my modified / debugged version of the flake: GitHub - rudra-code-creator/snowflake: A repository which contains my current Nix (flake-based) setup!
Thanks for any help in advanced