Skip to content

Instantly share code, notes, and snippets.

@MikaelFangel
Last active October 2, 2023 14:05
Show Gist options
  • Save MikaelFangel/30dcbfc3812db6e833be8654f64384f3 to your computer and use it in GitHub Desktop.
Save MikaelFangel/30dcbfc3812db6e833be8654f64384f3 to your computer and use it in GitHub Desktop.
HowTo: Use old Nix-Cli on flakyfied system

Fix for one command only

nix-build flake:nixpkgs -A hello
nix-build -I nixpkgs=flake:github:NixOS/nixpkgs/nixos-23.05 '<nixpkgs>' -A hello
NIX_PATH=nixpkgs=flake:nixpkgs nix-build '<nixpkgs>' -A hello

Fix it decleratively

nix.nixPath = [ "nixpkgs=${inputs.nixpkgs.outPath}" ];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment