I am exploring how to selectively roll back a specific package to a prior release without flakes or home-manager so I am working with NixOS’s nixpkgs using configuration.nix
only.
The current latest reslease of Hyprland is v47.2. My task is to roll back to v46.2. The reason why is that after the 47.2 upgrade, the compositor (or at least with my dotfiles) became completely FUBAR’ed. When I used NixOS’s built in generation roll back feature (at the UEFI bootloader), going back to Hyprland v46.2 worked perfectly. I could submit a bug report upstream but for now I wish to experiment with NixOS famous abilitiy to rollback packages using symlinks or similar methods.
I am relatively new to the NixOS world. I’ve consluted the official FAQ on pinning releases: FAQ/Pinning Nixpkgs - NixOS Wiki
I found a helpful website from the Nix community which provides code samples and suggested commands: Nix Package Versions
From that site, here was one such suggested code snippet:
let
pkgs = import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/21808d22b1cda1898b71cf1a1beb524a97add2c4.tar.gz";
}) {};
myPkg = pkgs.hyprland;
in
nixpkgs didn’t like that and returned this error. I moved around the codesnippet around my configuration.nix.
Any idea what it is trying to say in greater detail and can anyone offer suggestions for what I could try next?
Error in full
… while evaluating the attribute 'config'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:1:12284:
… while calling the 'seq' builtin
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:1:12293:
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: syntax error, unexpected LET
at /home/evangelist/nixoslaptop-configs/configuration.nix:206:3:
205|
206| let
| ^
207| pkgs = import (builtins.fetchTarball {
building Nix...
error:
… while evaluating the attribute 'config'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:1:12284:
… while calling the 'seq' builtin
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:1:12293:
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: syntax error, unexpected LET
at /home/evangelist/nixoslaptop-configs/configuration.nix:206:3:
205|
206| let
| ^
207| pkgs = import (builtins.fetchTarball {
building the system configuration...
error:
… while evaluating the attribute 'config.system.build.toplevel'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:1:12284:
… while calling the 'seq' builtin
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:1:12293:
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: syntax error, unexpected LET
at /home/evangelist/nixoslaptop-configs/configuration.nix:206:3:
205|
206| let
| ^
207| pkgs = import (builtins.fetchTarball {
Here is the experimental branch on my GitHub repo showing the current state of my configuration.nix
: