add home manager configs

This commit is contained in:
Joakim Repomaa
2025-01-29 13:58:39 +02:00
parent ae4f9c2825
commit 1241c82bd7
44 changed files with 4542 additions and 11 deletions

View File

@@ -0,0 +1,17 @@
{ pkgs }:
let
ykman = "${pkgs.yubikey-manager}/bin/ykman";
sk = "${pkgs.skim}/bin/sk";
wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy";
in
pkgs.writeShellScriptBin "otp" ''
skim_command=("${sk}")
if [ -n "$*" ]; then
skim_command+=(-q "$*")
fi
account=$(${ykman} oath accounts list | "''${skim_command[@]}")
[ -z "$account" ] && exit 1
${ykman} oath accounts code -s "$account" | ${wl-copy} -n
''