Skip to content

Instantly share code, notes, and snippets.

@eNV25
Last active November 21, 2025 20:30
Show Gist options
  • Select an option

  • Save eNV25/fccd7ce68236944fba67335e9cbb160d to your computer and use it in GitHub Desktop.

Select an option

Save eNV25/fccd7ce68236944fba67335e9cbb160d to your computer and use it in GitHub Desktop.
Script to enable `nix profile` with an unprivileged chroot store using `nix shell`. You need nix (from system or static build from hydra) outside the profile and nixpkgs#nix installed inside the profile.
#! /usr/bin/env nix
#! nix shell --expr ``{}`` --command bash --rcfile
. ~/.bashrc
. ~/.nix-profile/etc/profile.d/nix.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment