mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 20:55:31 +03:00
browserpass: init at 1.0.2
This commit is contained in:
parent
1bb8a47803
commit
857a3b872c
4 changed files with 64 additions and 0 deletions
|
@ -71,6 +71,7 @@
|
||||||
./programs/atop.nix
|
./programs/atop.nix
|
||||||
./programs/bash/bash.nix
|
./programs/bash/bash.nix
|
||||||
./programs/blcr.nix
|
./programs/blcr.nix
|
||||||
|
./programs/browserpass.nix
|
||||||
./programs/cdemu.nix
|
./programs/cdemu.nix
|
||||||
./programs/chromium.nix
|
./programs/chromium.nix
|
||||||
./programs/command-not-found/command-not-found.nix
|
./programs/command-not-found/command-not-found.nix
|
||||||
|
|
26
nixos/modules/programs/browserpass.nix
Normal file
26
nixos/modules/programs/browserpass.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
###### interface
|
||||||
|
options = {
|
||||||
|
programs.browserpass = {
|
||||||
|
enable = mkOption {
|
||||||
|
default = false;
|
||||||
|
type = types.bool;
|
||||||
|
description = ''
|
||||||
|
Wheter to install the NativeMessaging configuration for installed browsers.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
###### implementation
|
||||||
|
config = mkIf config.programs.browserpass.enable {
|
||||||
|
environment.systemPackages = [ pkgs.browserpass ];
|
||||||
|
environment.etc."chromium/native-messaging-hosts/com.dannyvankooten.browserpass.json".source = "${pkgs.browserpass}/etc/chrome-host.json";
|
||||||
|
environment.etc."opt/chrome/native-messaging-hosts/com.dannyvankooten.browserpass.json".source = "${pkgs.browserpass}/etc/chrome-host.json";
|
||||||
|
};
|
||||||
|
}
|
35
pkgs/tools/security/browserpass/default.nix
Normal file
35
pkgs/tools/security/browserpass/default.nix
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{ stdenv, lib, fetchzip }:
|
||||||
|
let
|
||||||
|
userDir = "~/.config/chromium";
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "browserpass-${version}";
|
||||||
|
|
||||||
|
version = "1.0.2";
|
||||||
|
|
||||||
|
src = fetchzip {
|
||||||
|
url = "https://github.com/dannyvankooten/browserpass/releases/download/${version}/browserpass-linux64.zip";
|
||||||
|
sha256 = "1fj2siczm472xd1n5i5k08cw94q5gpisfqmvrhhwq7zdjvpcrh8y";
|
||||||
|
stripRoot = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
dontBuild = true;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
install -D browserpass-linux64 "$out/bin/browserpass"
|
||||||
|
|
||||||
|
host_file="$out/bin/browserpass"
|
||||||
|
sed -i -e "s!%%replace%%!$host_file!" chrome-host.json
|
||||||
|
sed -i -e "s!%%replace%%!$host_file!" firefox-host.json
|
||||||
|
|
||||||
|
install -D chrome-host.json "$out/etc/chrome-host.json"
|
||||||
|
install -D firefox-host.json "$out/etc/firefox-host.json"
|
||||||
|
|
||||||
|
'';
|
||||||
|
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
maintainers = with maintainers; [ cstrahan ];
|
||||||
|
platforms = ["x86_64-linux"];
|
||||||
|
};
|
||||||
|
}
|
|
@ -543,6 +543,8 @@ with pkgs;
|
||||||
|
|
||||||
pass = callPackage ../tools/security/pass { };
|
pass = callPackage ../tools/security/pass { };
|
||||||
|
|
||||||
|
browserpass = callPackage ../tools/security/browserpass { };
|
||||||
|
|
||||||
oracle-instantclient = callPackage ../development/libraries/oracle-instantclient { };
|
oracle-instantclient = callPackage ../development/libraries/oracle-instantclient { };
|
||||||
|
|
||||||
kwakd = callPackage ../servers/kwakd { };
|
kwakd = callPackage ../servers/kwakd { };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue