diff --git a/nixos/cli.nix b/nixos/cli.nix index 58d03732..2eaff347 100644 --- a/nixos/cli.nix +++ b/nixos/cli.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: - { home.packages = with pkgs; [ + (import ./programs/genpass.nix {}) wget git gnupg curl tmux htop atop pciutils powertop ripgrep-all fd dnsutils du-dust ( pass.withExtensions (ext: [ ext.pass-otp ext.pass-import ext.pass-genphrase ext.pass-audit ext.pass-update ])) cabal-install stack hsetroot lm_sensors diff --git a/nixos/programs/genpass.nix b/nixos/programs/genpass.nix new file mode 100644 index 00000000..94448f10 --- /dev/null +++ b/nixos/programs/genpass.nix @@ -0,0 +1,26 @@ +{ pkgs ? import {} }: +with pkgs; +rustPlatform.buildRustPackage rec { + pname = "genpass"; + version = "0.4.1"; + + src = fetchFromGitHub { + owner = "cyplo"; + repo = pname; + rev = "v" + version; + sha256 = "1b22m7g55k5ry0vwyd8pakh8rmfkhk37qy5r74cn3n5pv3fcwini"; + }; + + cargoSha256 = "0lpavjm9yq7fcyqj8ihs60ipmz3f724rkyh50j6f62g6fkn8jybi"; + + buildInputs = [ + openssl pkgconfig git + ]; + + meta = with stdenv.lib; { + description = "A simple yet robust commandline random password generator."; + homepage = "https://github.com/cyplo/genpass"; + license = licenses.agpl3; + platforms = platforms.all; + }; +}