nixos-config/nixos/system/desktop/pass.nix
2021-09-25 20:28:25 +02:00

40 lines
839 B
Nix

{ lib, pkgs, ... }:
with lib;
let
# desktop file
# ------------
# makes it possible to be used by other programs
desktopFile = name: bin:
pkgs.writeTextFile {
name = "${name}.desktop";
destination = "/share/applications/${name}.desktop";
text = ''
[Desktop Entry]
Categories=Application;Utility;
Comment=password dialog
Encoding=UTF-8
Exec=${bin}
Icon=gnome-lockscreen
Name=${name}
Terminal=false
Type=Application
'';
};
in {
environment.systemPackages = [
pkgs.pass-otp
(desktopFile "passmenu" "${pkgs.pass-otp}/bin/passmenu --type -l 10")
# todo ein script machen was hier tut
# zbarimg -q --raw 2018-12-18-114509.png | pass otp insert mindcurv/cloudamqp/otp
pkgs.zbar
pkgs.otpmenu
];
}