Add nix shell env

This commit is contained in:
Jeffrey Serio 2024-09-07 16:07:20 -05:00
parent 7bb0f1f6bb
commit f9cf2b76e7
4 changed files with 30 additions and 15 deletions

1
.envrc Normal file
View File

@ -0,0 +1 @@
use nix

13
.gitignore vendored
View File

@ -1,12 +1 @@
.DS_Store
.idea
*.log
tmp/
.ruby-version
.bundle
vendor
Gemfile.lock
coverage
gemtext2md
.direnv

View File

@ -1,9 +1,14 @@
#!/usr/bin/env python3
#!/usr/bin/env nix-shell
#! nix-shell -i python3 --packages python3 python312Packages.resend
import os
import resend
import subprocess
resend.api_key = os.environ["RESEND_API_KEY"]
resend.api_key = subprocess.run(
["kwallet-query", "-r", "resend_api_key", "default", "-f", "Passwords"],
capture_output=True,
text=True,
).stdout.strip("\n")
params: resend.Emails.SendParams = {
"from": "Borgmatic <onboarding@resend.dev>",

20
shell.nix Normal file
View File

@ -0,0 +1,20 @@
with import <nixpkgs> { };
mkShell {
buildInputs = with pkgs; [
gum
python312Packages.beautifulsoup4
python312Packages.black
python312Packages.bpython
python312Packages.docopt
python312Packages.isort
python312Packages.pip
python312Packages.pytest
python312Packages.requests
python312Packages.resend
python312Packages.rich
pyright
shellcheck
shfmt
];
}