.
This commit is contained in:
parent
cf9dcf2568
commit
59e8ca812c
6 changed files with 0 additions and 57 deletions
|
|
@ -8,7 +8,6 @@
|
|||
}: {
|
||||
packages = {
|
||||
studio = pkgs.callPackage ./studio {erosanix = inputs.erosanix.lib.${system};};
|
||||
vaultwarden = pkgs.callPackage ./vaultwarden {};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
pwgen -s 128 1
|
||||
|
|
@ -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)
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
pwgen -s 128 1
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
python ./hash.py "$(just vars get ulmo qbittorrent/password | jq -r)"
|
||||
Loading…
Add table
Add a link
Reference in a new issue