From 9d456c2b2a794967cfa2bc3466f30429f480d25d Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Mon, 1 Apr 2019 11:33:18 +0200 Subject: [PATCH] Readme: Update Nix/NixOS instructions (#33) --- README.md | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 9b1d081..c5db34d 100644 --- a/README.md +++ b/README.md @@ -58,30 +58,26 @@ Finally proceed to the [Configure browsers](#configure-browsers) section. #### Install on Nix / NixOS -If you wish to have a stateless setup, make sure you have this in your `/etc/nixos/configuration.nix` and rebuild your system: +For a declarative NixOS installation, update your channel with `sudo nix-channel --update`, use the following to your `/etc/nixos/configuration.nix` and rebuild your system: ```nix { pkgs, ... }: { programs.browserpass.enable = true; environment.systemPackages = with pkgs; [ - # All of these browsers will work with it - chromium - firefox - google-chrome - vivaldi + # All of these browsers will work + chromium firefox google-chrome vivaldi + # firefox*-bin versions do *not* work with this. If you require such Firefox versions, use the stateful setup described below. ]; } ``` -Note: `firefox*-bin` versions do _not_ work statelessly. If you require such firefox versions, use the stateful setup as described below. - -For a stateful setup, install Browserpass with: +For a stateful Nix setup, update your channel, install Browserpass and link the necessary files with the Makefile (see [Configure browsers](#configure-browsers) section), but pass `DESTDIR=~/.nix-profile`: +```bash +$ nix-channel --update +$ nix-env -iA nixpkgs.browserpass # Or nix-env -iA nixos.browserpass on NixOS +$ DESTDIR=~/.nix-profile make -f ~/.nix-profile/lib/browserpass/Makefile ``` -nix-env -iA nixpkgs.browserpass -``` - -Then link the necessary files (see [Configure browsers](#configure-browsers) section and refer to Makefile in particular), but use the `~/.nix-profile` folder as the source of json files (for example, instead of `/usr/lib/browserpass/hosts/chromium/com.github.browserpass.native.json` as in `hosts-chromium-user` make goal you would use `~/.nix-profile/usr/lib/browserpass/hosts/chromium/com.github.browserpass.native.json`. #### Install on Windows