nixos-config/system/desktop/pass.nix

41 lines
839 B
Nix
Raw Normal View History

2019-10-24 02:20:38 +02:00
{ lib, pkgs, ... }:
with lib;
let
# desktop file
# ------------
# makes it possible to be used by other programs
desktopFile = name: bin:
pkgs.writeTextFile {
2019-12-20 05:54:26 +01:00
name = "${name}.desktop";
2019-10-24 02:20:38 +02:00
destination = "/share/applications/${name}.desktop";
2019-12-20 05:54:26 +01:00
text = ''
2019-10-24 02:20:38 +02:00
[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
];
}