From 34428fc7090744481e2328ddfda466596e875775 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Mon, 25 Sep 2017 13:14:51 +0100 Subject: [PATCH] Add overlay and instructions for using it --- README.md | 13 ++++--------- modules/programs/home-manager.nix | 4 ++-- overlay.nix | 3 +++ 3 files changed, 9 insertions(+), 11 deletions(-) create mode 100644 overlay.nix diff --git a/README.md b/README.md index 7ad61366..32960e91 100644 --- a/README.md +++ b/README.md @@ -62,16 +62,11 @@ Currently the easiest way to install Home Manager is as follows: depending on whether you are tracking Nixpkgs unstable or version 17.03. -3. Add Home Manager to your user's Nixpkgs, for example by adding it - to the `packageOverrides` section in your - `~/.config/nixpkgs/config.nix` file: +3. Add Home Manager to your user's Nixpkgs, for example by symlinking the + overlay to `~/.config/nixpkgs/overlays`: - ```nix - { - packageOverrides = pkgs: rec { - home-manager = import ./home-manager { inherit pkgs; }; - }; - } + ```console + $ ln -s ~/.config/nixpkgs/home-manager/overlay.nix ~/.config/nixpkgs/overlays/home-manager.nix ``` 4. Install the `home-manager` package: diff --git a/modules/programs/home-manager.nix b/modules/programs/home-manager.nix index 2b211b85..ad7278a1 100644 --- a/modules/programs/home-manager.nix +++ b/modules/programs/home-manager.nix @@ -46,8 +46,8 @@ in if nix-env -q | grep -q '^home-manager$' ; then $DRY_RUN_CMD nix-env -e home-manager - echo "You can now remove the 'home-manager' entry in" - echo "'~/.config/nixpkgs/config.nix', if you want." + echo "You can now remove the 'home-manager' packageOverride" + echo "or overlay in '~/.config/nixpkgs/', if you want." fi ''; }; diff --git a/overlay.nix b/overlay.nix new file mode 100644 index 00000000..6c64fa6b --- /dev/null +++ b/overlay.nix @@ -0,0 +1,3 @@ +self: super: { + home-manager = import ./home-manager { pkgs = super; }; +}