mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-16 13:28:16 +00:00
nix: include user channels in NIX_PATH
This commit is contained in:
parent
020d666957
commit
184e9f34be
6 changed files with 16 additions and 7 deletions
|
@ -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
|
2017-07-28
|
||||||
- added support for command-not-found, using nix-index
|
- added support for command-not-found, using nix-index
|
||||||
|
|
||||||
|
|
|
@ -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.
|
The bootstrap installer will configure a channel for this repository.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo nix-channel --update darwin
|
nix-channel --update darwin
|
||||||
darwin-rebuild changelog
|
darwin-rebuild changelog
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -138,8 +138,8 @@ install(){
|
||||||
|
|
||||||
# Fetch the nix-darwin repo
|
# Fetch the nix-darwin repo
|
||||||
echo -e ""$YELLOW"Configuring darwin channel..."$ESC""
|
echo -e ""$YELLOW"Configuring darwin channel..."$ESC""
|
||||||
sudo nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin || exit
|
nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin || exit
|
||||||
sudo nix-channel --update || exit
|
nix-channel --update || exit
|
||||||
|
|
||||||
# Create symlink for old NIX_PATH entry
|
# Create symlink for old NIX_PATH entry
|
||||||
ln -sfn "/nix/var/nix/profiles/per-user/root/channels/darwin" "$HOME/.nix-defexpr/darwin" || exit
|
ln -sfn "/nix/var/nix/profiles/per-user/root/channels/darwin" "$HOME/.nix-defexpr/darwin" || exit
|
||||||
|
|
|
@ -285,6 +285,7 @@
|
||||||
"nixpkgs=$HOME/.nix-defexpr/nixpkgs"
|
"nixpkgs=$HOME/.nix-defexpr/nixpkgs"
|
||||||
"darwin-config=$HOME/.nixpkgs/darwin-configuration.nix"
|
"darwin-config=$HOME/.nixpkgs/darwin-configuration.nix"
|
||||||
"/nix/var/nix/profiles/per-user/root/channels"
|
"/nix/var/nix/profiles/per-user/root/channels"
|
||||||
|
"$HOME/.nix-defexpr/channels"
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
|
@ -286,6 +286,7 @@ in
|
||||||
[ # Include default path <darwin-config>.
|
[ # Include default path <darwin-config>.
|
||||||
"darwin-config=$HOME/.nixpkgs/darwin-configuration.nix"
|
"darwin-config=$HOME/.nixpkgs/darwin-configuration.nix"
|
||||||
"/nix/var/nix/profiles/per-user/root/channels"
|
"/nix/var/nix/profiles/per-user/root/channels"
|
||||||
|
"$HOME/.nix-defexpr/channels"
|
||||||
];
|
];
|
||||||
description = ''
|
description = ''
|
||||||
The default Nix expression search path, used by the Nix
|
The default Nix expression search path, used by the Nix
|
||||||
|
|
|
@ -49,8 +49,8 @@ let
|
||||||
if ! test -e "$darwinPath"; then
|
if ! test -e "$darwinPath"; then
|
||||||
echo "[1;31merror: Changed <darwin> but target does not exist, aborting activation[0m" >&2
|
echo "[1;31merror: Changed <darwin> but target does not exist, aborting activation[0m" >&2
|
||||||
echo "Add the darwin repo as a channel or set nix.nixPath:" >&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 "$ nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin" >&2
|
||||||
echo "$ sudo nix-channel --update" >&2
|
echo "$ nix-channel --update" >&2
|
||||||
echo >&2
|
echo >&2
|
||||||
echo "or set" >&2
|
echo "or set" >&2
|
||||||
echo >&2
|
echo >&2
|
||||||
|
@ -63,8 +63,8 @@ let
|
||||||
if ! test -e "$nixpkgsPath"; then
|
if ! test -e "$nixpkgsPath"; then
|
||||||
echo "[1;31merror: Changed <nixpkgs> but target does not exist, aborting activation[0m" >&2
|
echo "[1;31merror: Changed <nixpkgs> but target does not exist, aborting activation[0m" >&2
|
||||||
echo "Add a nixpkgs channel or set nix.nixPath:" >&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 "$ nix-channel --add http://nixos.org/channels/nixpkgs-unstable nixpkgs" >&2
|
||||||
echo "$ sudo nix-channel --update" >&2
|
echo "$ nix-channel --update" >&2
|
||||||
echo >&2
|
echo >&2
|
||||||
echo "or set" >&2
|
echo "or set" >&2
|
||||||
echo >&2
|
echo >&2
|
||||||
|
|
Loading…
Add table
Reference in a new issue