Hacker News new | ask | show | jobs
by ambrop7 4427 days ago
I wrap the nixos-rebuild command into a script that sets a custom nixpkgs:

#!/bin/sh exec nixos-rebuild -I nixpkgs=/etc/nixos/nixpkgs "$@"

This itself works, but then you're probably still using channels for nix-env (user profiles). These need to be configured separately. Or maybe with NIX_PATH, I don't know since I don't use the user profiles feature.

After that, you just work with it like any git repo (presumably you, like git pull --rebase, git rebase -i...).

1 comments

For using with nix-env, there's still -I, or -f. E.g. nix-env -f ~/nixpkgs -iA thepackage.