1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

nix: include user channels in NIX_PATH

This commit is contained in:
Daiderd Jordan 2017-09-06 23:37:34 +02:00
parent 020d666957
commit 184e9f34be
No known key found for this signature in database
GPG key ID: D02435D05B810C96
6 changed files with 16 additions and 7 deletions

View file

@ -1,3 +1,10 @@
2017-07-06
- added user channels to the default nix.nixPath
Using a user channel now works without any custom configuration.
See https://github.com/NixOS/nix/issues/1548 if you are running into
issues when updating your channel.
2017-07-28
- added support for command-not-found, using nix-index

View file

@ -27,7 +27,7 @@ Either modify the existing file to source/import the one from `/etc/static` or r
The bootstrap installer will configure a channel for this repository.
```bash
sudo nix-channel --update darwin
nix-channel --update darwin
darwin-rebuild changelog
```

View file

@ -138,8 +138,8 @@ install(){
# Fetch the nix-darwin repo
echo -e ""$YELLOW"Configuring darwin channel..."$ESC""
sudo nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin || exit
sudo nix-channel --update || exit
nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin || exit
nix-channel --update || exit
# Create symlink for old NIX_PATH entry
ln -sfn "/nix/var/nix/profiles/per-user/root/channels/darwin" "$HOME/.nix-defexpr/darwin" || exit

View file

@ -285,6 +285,7 @@
"nixpkgs=$HOME/.nix-defexpr/nixpkgs"
"darwin-config=$HOME/.nixpkgs/darwin-configuration.nix"
"/nix/var/nix/profiles/per-user/root/channels"
"$HOME/.nix-defexpr/channels"
];
nixpkgs.config.allowUnfree = true;

View file

@ -286,6 +286,7 @@ in
[ # Include default path <darwin-config>.
"darwin-config=$HOME/.nixpkgs/darwin-configuration.nix"
"/nix/var/nix/profiles/per-user/root/channels"
"$HOME/.nix-defexpr/channels"
];
description = ''
The default Nix expression search path, used by the Nix

View file

@ -49,8 +49,8 @@ let
if ! test -e "$darwinPath"; then
echo "error: Changed <darwin> but target does not exist, aborting activation" >&2
echo "Add the darwin repo as a channel or set nix.nixPath:" >&2
echo "$ sudo nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin" >&2
echo "$ sudo nix-channel --update" >&2
echo "$ nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin" >&2
echo "$ nix-channel --update" >&2
echo >&2
echo "or set" >&2
echo >&2
@ -63,8 +63,8 @@ let
if ! test -e "$nixpkgsPath"; then
echo "error: Changed <nixpkgs> but target does not exist, aborting activation" >&2
echo "Add a nixpkgs channel or set nix.nixPath:" >&2
echo "$ sudo nix-channel --add http://nixos.org/channels/nixpkgs-unstable nixpkgs" >&2
echo "$ sudo nix-channel --update" >&2
echo "$ nix-channel --add http://nixos.org/channels/nixpkgs-unstable nixpkgs" >&2
echo "$ nix-channel --update" >&2
echo >&2
echo "or set" >&2
echo >&2