From fa806b46a6034b16c8dba42be4c5b61747962265 Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 16 Sep 2018 00:26:42 +0200 Subject: [PATCH] ma secrets: add completion --- 2configs/tools/mobility.nix | 6 +++++- 2configs/tools/secrets.nix | 12 ++++++++++++ 2configs/zsh-user.nix | 2 ++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 2configs/tools/secrets.nix diff --git a/2configs/tools/mobility.nix b/2configs/tools/mobility.nix index 1993a52..8a559db 100644 --- a/2configs/tools/mobility.nix +++ b/2configs/tools/mobility.nix @@ -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 ]; } diff --git a/2configs/tools/secrets.nix b/2configs/tools/secrets.nix new file mode 100644 index 0000000..f88618c --- /dev/null +++ b/2configs/tools/secrets.nix @@ -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 $@ + ''; +} diff --git a/2configs/zsh-user.nix b/2configs/zsh-user.nix index 6be078f..23ae572 100644 --- a/2configs/zsh-user.nix +++ b/2configs/zsh-user.nix @@ -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