Add correct channels
This commit is contained in:
parent
2281d0164b
commit
259a6ed52e
|
@ -2,7 +2,16 @@
|
|||
|
||||
[ -e ~/dotfiles ] || git clone git@codeberg.org:djm/dotfiles.git
|
||||
|
||||
nix-channel --add https://github.com/nix-community/home-manager/archive/release-$(nixos-version | cut -d. -f1-2).tar.gz home-manager
|
||||
if [ -x "$(command -v nixos-version)" ]; then
|
||||
# On NixOS use the hm version corresponding to the NixOS version, and add nixos-unstable as unstable
|
||||
nix-channel --add https://github.com/nix-community/home-manager/archive/release-$(nixos-version | cut -d. -f1-2).tar.gz home-manager
|
||||
nix-channel --add https://nixos.org/channels/nixos-unstable unstable
|
||||
else
|
||||
# On other systems use master, and add nixpkgs-unstable as unstable for compatibility between NixOS and non-NixOS installations
|
||||
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
|
||||
nix-channel --add https://nixos.org/channels/nixpkgs-unstable unstable
|
||||
fi
|
||||
|
||||
nix-channel --update
|
||||
|
||||
export NIX_PATH=$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels${NIX_PATH:+:$NIX_PATH}
|
||||
|
|
Loading…
Reference in New Issue