ma secrets: add completion

This commit is contained in:
makefu 2018-09-16 00:26:42 +02:00
parent 905684e02b
commit a881fe45f1
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225
3 changed files with 19 additions and 1 deletions

View File

@ -3,7 +3,11 @@
users.users.makefu.packages = with pkgs;[
go-mtpfs
mosh
sshfs
rclone
exfat
(pkgs.callPackage ./secrets.nix {})
];
boot.extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ];
# boot.extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ];
}

View File

@ -0,0 +1,12 @@
{ pass, write, writeDash, ... }:
write "secrets" {
"/bin/secrets".link = writeDash "brain" ''
PASSWORD_STORE_DIR=$HOME/.secrets-pass/ \
exec ${pass}/bin/pass $@
'';
"/bin/secretsmenu".link = writeDash "secretsmenu" ''
PASSWORD_STORE_DIR=$HOME/.secrets-pass/ \
exec ${pass}/bin/passmenu $@
'';
}

View File

@ -68,6 +68,8 @@ in
compdef _pass brain
zstyle ':completion::complete:brain::' prefix "$HOME/brain"
compdef _pass secrets
zstyle ':completion::complete:secrets::' prefix "$HOME/.secrets-pass/"
# ctrl-x ctrl-e
autoload -U edit-command-line