This commit is contained in:
Chris Kruining 2026-04-12 13:02:57 +02:00
parent cf9dcf2568
commit 59e8ca812c
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
6 changed files with 0 additions and 57 deletions

View file

@ -8,7 +8,6 @@
}: { }: {
packages = { packages = {
studio = pkgs.callPackage ./studio {erosanix = inputs.erosanix.lib.${system};}; studio = pkgs.callPackage ./studio {erosanix = inputs.erosanix.lib.${system};};
vaultwarden = pkgs.callPackage ./vaultwarden {};
}; };
}; };
} }

View file

@ -1,28 +0,0 @@
{lib, stdenv, rustPlatform, fetchFromGitHub, openssl, pkg-config, postgresql, dbBackend ? "postgresql", ...}:
rustPlatform.buildRustPackage rec {
pname = "vaultwarden";
version = "1.34.3";
src = fetchFromGitHub {
owner = "Timshel";
repo = "vaultwarden";
rev = "1.34.3";
hash = "sha256-Dj0ySVRvBZ/57+UHas3VI8bi/0JBRqn0IW1Dq+405J0=";
};
cargoHash = "sha256-4sDagd2XGamBz1XvDj4ycRVJ0F+4iwHOPlj/RglNDqE=";
env.VW_VERSION = version;
nativeBuildInputs = [pkg-config];
buildInputs =
[openssl]
++ lib.optional (dbBackend == "postgresql") postgresql;
buildFeatures = dbBackend;
meta = with lib; {
license = licenses.agpl3Only;
mainProgram = "vaultwarden";
};
}

View file

@ -1,3 +0,0 @@
#!/bin/bash
pwgen -s 128 1

View file

@ -1,19 +0,0 @@
#!/usr/bin/bash
import base64
import hashlib
import sys
import uuid
password = sys.argv[1]
salt = uuid.uuid4()
salt_bytes = salt.bytes
password = str.encode(password)
hashed_password = hashlib.pbkdf2_hmac("sha512", password, salt_bytes, 100000, dklen=64)
b64_salt = base64.b64encode(salt_bytes).decode("utf-8")
b64_password = base64.b64encode(hashed_password).decode("utf-8")
password_string = "@ByteArray({salt}:{password})".format(
salt=b64_salt, password=b64_password
)
print(password_string)

View file

@ -1,3 +0,0 @@
#!/bin/bash
pwgen -s 128 1

View file

@ -1,3 +0,0 @@
#!/bin/bash
python ./hash.py "$(just vars get ulmo qbittorrent/password | jq -r)"