diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2016-12-15 14:37:31 +0100 |
|---|---|---|
| committer | Daiderd Jordan <daiderd@gmail.com> | 2016-12-15 14:37:31 +0100 |
| commit | 3e4583ee9a7d8cd4cdca96a8b332b0f859abeff8 (patch) | |
| tree | d8bec61105ad049fb912ec5efa049121a2824f00 /modules | |
| parent | 5949d2ed5da2c43cedc009202fccce7c8c9bc362 (diff) | |
change default nix.nixPath to work for single user installs
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/examples/lnl.nix | 24 | ||||
| -rw-r--r-- | modules/nix/default.nix | 5 |
2 files changed, 16 insertions, 13 deletions
diff --git a/modules/examples/lnl.nix b/modules/examples/lnl.nix index b3b604b..3a7f490 100644 --- a/modules/examples/lnl.nix +++ b/modules/examples/lnl.nix @@ -58,13 +58,9 @@ programs.zsh.enable = true; programs.zsh.shellInit = '' - export NIX_PATH=nixpkgs=$HOME/.nix-defexpr/nixpkgs:darwin=$HOME/.nix-defexpr/darwin:darwin-config=$HOME/.nixpkgs/darwin-config.nix:$HOME/.nix-defexpr/channels_root - - # Set up secure multi-user builds: non-root users build through the - # Nix daemon. - if [ "$USER" != root -a ! -w /nix/var/nix/db ]; then - export NIX_REMOTE=daemon - fi + cfg=$HOME/.nixpkgs/darwin-config.nix + darwin=$HOME/.nix-defexpr/darwin + pkgs=$HOME/.nix-defexpr/nixpkgs ''; programs.zsh.loginShellInit = '' @@ -98,10 +94,6 @@ ;; esac } - - cfg=$HOME/.nixpkgs/darwin-config.nix - darwin=$HOME/.nix-defexpr/darwin - pkgs=$HOME/.nix-defexpr/nixpkgs ''; programs.zsh.interactiveShellInit = '' @@ -125,6 +117,16 @@ environment.shellAliases.gl = "git log --graph --oneline"; environment.shellAliases.gd = "git diff --minimal --patch"; + nix.distributedBuilds = true; + + nix.nixPath = + [ # Use local nixpkgs checkout instead of channels. + "darwin=$HOME/.nix-defexpr/darwin" + "darwin-config=$HOME/.nixpkgs/darwin-configuration.nix" + "nixpkgs=$HOME/.nix-defexpr/nixpkgs" + "/nix/var/nix/profiles/per-user/root/channels" + ]; + nixpkgs.config.allowUnfree = true; nixpkgs.config.packageOverrides = self: { diff --git a/modules/nix/default.nix b/modules/nix/default.nix index 4268669..8e7ba02 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -284,10 +284,11 @@ in nixPath = mkOption { type = types.listOf types.str; default = - [ "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixpkgs" - "/nix/var/nix/profiles/per-user/root/channels" + [ # Incldue default paths for <darwin> and <darwin-config>. "darwin=$HOME/.nix-defexpr/darwin" "darwin-config=$HOME/.nixpkgs/darwin-configuration.nix" + "nixpkgs=$HOME/.nix-defexpr/channels/nixpkgs" + "$HOME/.nix-defexpr/channels" ]; description = '' The default Nix expression search path, used by the Nix |
