nixos-config/nixos/system/desktop/pass.nix

42 lines
909 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
'';
};
2021-11-01 09:20:42 +01:00
in
{
2019-10-24 02:20:38 +02:00
environment.systemPackages = [
2022-06-14 22:56:58 +02:00
(pkgs.pass.withExtensions (ext: [ ext.pass-otp ]))
(desktopFile "passmenu" "${pkgs.pass.withExtensions (ext: [ext.pass-otp])}/bin/passmenu --type -l 10")
2019-10-24 02:20:38 +02:00
# 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
];
}