aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/.gitignore1
-rw-r--r--scripts/p7s/bitwarden.py8
-rw-r--r--scripts/p7s/ssh.py7
-rw-r--r--scripts/p7s/ubpkg.py3
-rw-r--r--scripts/pyproject.toml1
5 files changed, 20 insertions, 0 deletions
diff --git a/scripts/.gitignore b/scripts/.gitignore
index bee8a64b..76e51dbb 100644
--- a/scripts/.gitignore
+++ b/scripts/.gitignore
@@ -1 +1,2 @@
__pycache__
+p7s.egg-info
diff --git a/scripts/p7s/bitwarden.py b/scripts/p7s/bitwarden.py
index ab6cc4f2..6d17d3b1 100644
--- a/scripts/p7s/bitwarden.py
+++ b/scripts/p7s/bitwarden.py
@@ -40,3 +40,11 @@ def get_item(server, email, uuid):
with b.login(server, email):
b.sync()
return b.get_item(uuid)
+
+
+@contextlib.contextmanager
+def default():
+ b = Bitwarden()
+ with b.login("https://vaultwarden.pdp7.net", "alex@corcoles.net"):
+ b.sync()
+ yield b
diff --git a/scripts/p7s/ssh.py b/scripts/p7s/ssh.py
new file mode 100644
index 00000000..aac25d8e
--- /dev/null
+++ b/scripts/p7s/ssh.py
@@ -0,0 +1,7 @@
+from p7s import bitwarden
+
+
+def setup_ssh():
+ with bitwarden.default() as b:
+ pass
+
diff --git a/scripts/p7s/ubpkg.py b/scripts/p7s/ubpkg.py
index 3a333254..0784ea71 100644
--- a/scripts/p7s/ubpkg.py
+++ b/scripts/p7s/ubpkg.py
@@ -1,6 +1,7 @@
import os
import pathlib
import platform
+import subprocess
import urllib.request
@@ -9,3 +10,5 @@ def setup_ubpkg():
with urllib.request.urlopen(f"https://github.com/alexpdp7/ubpkg/releases/latest/download/ubpkg-linux-{platform.machine()}") as urlopen:
ubpkg.write_bytes(urlopen.read())
os.chmod(ubpkg, 0o700)
+
+ subprocess.run([ubpkg, "bitwarden-cli", "deltachat-rpc-server", "hatch", "kubectl", "nix-portable", "ressh", "talosctl", "typst"], check=True)
diff --git a/scripts/pyproject.toml b/scripts/pyproject.toml
index 36bf52c2..291176ca 100644
--- a/scripts/pyproject.toml
+++ b/scripts/pyproject.toml
@@ -14,6 +14,7 @@ setup-imapfilter = 'p7s.mail:setup_imapfilter'
setup-soju = 'p7s.soju:setup_soju'
setup-ubpkg = 'p7s.ubpkg:setup_ubpkg'
setup-x12 = 'p7s.x12:setup_x12'
+setup-ssh = 'p7s.ssh:setup_ssh'
senpai = 'p7s.senpai:main'
ledger = 'p7s.ledger:main'
google-meet-toggle-mute = 'p7s.google_meet:toggle_mute'