Switch to using KeePass

This commit is contained in:
Emi Simpson 2024-06-23 09:57:28 -04:00
parent 7090183f8e
commit b517ac71dc
Signed by: Emi
GPG key ID: A12F2C2FFDC3D847
4 changed files with 58 additions and 4 deletions

View file

@ -28,6 +28,8 @@
yt-dlp yt-dlp
magic-wormhole-rs magic-wormhole-rs
hledger hledger
keepassxc
passhole
] ++ (import ../system/home-manager.nix).extraPackages pkgs; ] ++ (import ../system/home-manager.nix).extraPackages pkgs;
editorconfig = { editorconfig = {
enable = true; enable = true;

View file

@ -24,12 +24,11 @@ pkgs: {
tab = "clone-in-kitty --type=tab"; tab = "clone-in-kitty --type=tab";
win = "clone-in-kitty --type=os-window"; win = "clone-in-kitty --type=os-window";
ns = "nix-shell --run fish -p"; ns = "nix-shell --run fish -p";
unlock-rclone = "set -x RCLONE_CONFIG_PASS (pass rclone)"; unlock-rclone = "set -x RCLONE_CONFIG_PASS (ph show --field Password rclone)";
":qa" = "exit"; ":qa" = "exit";
":q" = "exit"; ":q" = "exit";
"rmount" = "rclone --rc --rc-web-gui --rc-no-auth --cache-dir /tmp/rclone-cache mount --vfs-cache-mode full --vfs-cache-max-size 8Gi"; "rmount" = "rclone --rc --rc-web-gui --rc-no-auth --cache-dir /tmp/rclone-cache mount --vfs-cache-mode full --vfs-cache-max-size 8Gi";
"backup" = "eval (pass backblaze/backup-bucket) && restic -r s3:s3.us-west-000.backblazeb2.com/ember-restic-backups/(hostname | sed \"s/\\(.\\)/\\u\\1/\") -p (pass backups | psub) backup ~/ --exclude-caches --exclude-file=${import ./restic.nix}"; "backup" = "eval (ph show --field 'Fish Script' 'Backblaze - Backup Bucket') && restic -r s3:s3.us-west-000.backblazeb2.com/ember-restic-backups/(hostname | sed \"s/\\(.\\)/\\u\\1/\") -p (ph show --field Password System/Backups | psub) backup ~/ --exclude-caches --exclude-file=${import ./restic.nix}";
"diary" = "bwrap --bind ~/Diary/gate/ / --bind ~/Diary/store /store --ro-bind /nix /nix --bind /run /run -- (whereis -b restic | cut -c 9-) -r /store -p (pass diary | psub) backup -H 'diary' -e /nix -e /run -e /store -e /home /";
"dl" = "wget (kitty +kitten clipboard --get-clipboard)"; "dl" = "wget (kitty +kitten clipboard --get-clipboard)";
yt = "yt-dlp -o '%(release_date>%Y-%m-%d,upload_date>%Y-%m-%d|???)s.%(title)s.%(ext)s' -f bestvideo+bestaudio --embed-subs --embed-thumbnail --embed-metadata --embed-chapters --embed-info-json (kitten clipboard -g)"; yt = "yt-dlp -o '%(release_date>%Y-%m-%d,upload_date>%Y-%m-%d|???)s.%(title)s.%(ext)s' -f bestvideo+bestaudio --embed-subs --embed-thumbnail --embed-metadata --embed-chapters --embed-info-json (kitten clipboard -g)";
}; };
@ -60,7 +59,7 @@ pkgs: {
description = "notices your fish function"; description = "notices your fish function";
body = '' body = ''
set UWU_DIR (mktemp -d /tmp/uwu.XXX) set UWU_DIR (mktemp -d /tmp/uwu.XXX)
encfs -i 60 ~/Pictures/uwu/ $UWU_DIR --extpass 'pass storage-encryption/annex-fs' encfs -i 60 ~/Pictures/uwu/ $UWU_DIR --extpass 'ph show System/encfs/uwu --field Password'
cd $UWU_DIR cd $UWU_DIR
fish --private fish --private
cd - cd -

View file

@ -2,4 +2,5 @@
dw = pkgs.callPackage ./dw.nix {}; dw = pkgs.callPackage ./dw.nix {};
justseeds = pkgs.callPackage ./justseeds.nix {}; justseeds = pkgs.callPackage ./justseeds.nix {};
anarchists-stencil = pkgs.callPackage ./anarchists-stencil.nix {}; anarchists-stencil = pkgs.callPackage ./anarchists-stencil.nix {};
passhole = pkgs.callPackage ./passhole.nix {};
} }

52
packages/passhole.nix Normal file
View file

@ -0,0 +1,52 @@
{ lib, python3Packages, fetchFromGitHub, callPackage}:
with python3Packages;
let
pykeepass-cache =
buildPythonPackage {
pname = "pykeepass-cache";
version = "2.0.2";
propagatedBuildInputs = [ pykeepass rpyc python-daemon ];
doCheck = false;
src = fetchFromGitHub {
owner = "libkeepass";
repo = "pykeepass_cache";
rev = "8ccd94e";
hash = "sha256-2QbbjC/GyBHMCEEZOJimPe+MZpHr5Hs1QzHhXS8Hn0k=";
};
pythonImportsCheck = [ "pykeepass_cache" ];
meta = with lib; {
homepage = "https://github.com/libkeepass/pykeepass_cache/tree/master";
description = "database caching for PyKeePass";
license = licenses.gpl3Only;
maintainers = [{
email = "ember@corviform.gay";
github = "Alch-Emi";
githubId = 38897201;
name = "Ember Hearth";
}];
};
};
in
buildPythonApplication rec {
pname = "passhole";
version = "1.10.0";
propagatedBuildInputs = [ pynput pykeepass pykeepass-cache colorama future pyotp qrcode ];
src = fetchFromGitHub {
owner = "Evidlo";
repo = "passhole";
rev = "v${version}";
hash = "sha256-SupFNFSgewpXogtZwfg1EvyLiLzE68CoJITWSG9NcwQ=";
};
pythonImportsCheck = [ "passhole" ];
meta = with lib; {
homepage = "https://github.com/Evidlo/passhole";
description = "CLI KeePass client with dmenu support";
license = licenses.gpl3Only;
maintainers = [{
email = "ember@corviform.gay";
github = "Alch-Emi";
githubId = 38897201;
name = "Ember Hearth";
}];
};
}