Readme: Update Nix/NixOS instructions (#33)

This commit is contained in:
Silvan Mosberger
2019-04-01 11:33:18 +02:00
committed by Maxim Baz
parent 67a63f0701
commit 9d456c2b2a

View File

@@ -58,30 +58,26 @@ Finally proceed to the [Configure browsers](#configure-browsers) section.
#### Install on Nix / NixOS #### 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 ```nix
{ pkgs, ... }: { { pkgs, ... }: {
programs.browserpass.enable = true; programs.browserpass.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# All of these browsers will work with it # All of these browsers will work
chromium chromium firefox google-chrome vivaldi
firefox # firefox*-bin versions do *not* work with this. If you require such Firefox versions, use the stateful setup described below.
google-chrome
vivaldi
]; ];
} }
``` ```
Note: `firefox*-bin` versions do _not_ work statelessly. If you require such firefox versions, use the stateful setup as described below. 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`:
For a stateful setup, install Browserpass with:
```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 <desired make goal>
``` ```
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 #### Install on Windows