remobed wasabi wallet and added electrum

feat/kile-v2
Ricard Illa 2022-11-12 16:45:31 +01:00
parent b01fbc4f6c
commit dd2d11af32
No known key found for this signature in database
GPG Key ID: F69A672B72E54902
4 changed files with 3 additions and 72 deletions

View File

@ -77,6 +77,7 @@
".config/syncthing"
".config/tea"
".config/whatsapp-for-linux"
".electrum"
".gnupg/private-keys-v1.d"
".hydrogen"
".kube"
@ -99,7 +100,6 @@
".vagrant.d"
".vdirsyncer"
".virtualenvs"
".walletwasabi"
".wine"
"Nextcloud"
"configs"

View File

@ -1,21 +1,6 @@
{ config, pkgs, ... }:
let
dev_name = "wallets";
uuid = "9d594b35-8a01-410a-8ea1-52589b54160c";
pw_name = "luks/wallets";
opts = "compress-force=zstd";
mount_wallets = pkgs.callPackage ./mount_wallets.nix { inherit dev_name uuid pw_name opts config pkgs; };
umount_wallets = pkgs.callPackage ./umount_wallets.nix { inherit dev_name config pkgs; };
in
{
home.packages = [
pkgs.monero
pkgs.monero-gui
pkgs.wasabiwallet
pkgs.bisq-desktop
mount_wallets
umount_wallets
];
home.packages =
[ pkgs.monero pkgs.monero-gui pkgs.electrum pkgs.bisq-desktop ];
}

View File

@ -1,34 +0,0 @@
{ dev_name, uuid, pw_name, opts, config, pkgs, ... }:
let
device = "/dev/mapper/${dev_name}";
home = "${config.home.homeDirectory}";
shell = "${pkgs.dash}/bin/dash";
cryptsetup = "${pkgs.cryptsetup}/bin/cryptsetup";
mkdir = "${pkgs.coreutils}/bin/mkdir";
pass = "${pkgs.pass}/bin/pass";
sudo = "/run/wrappers/bin/doas";
mount = "/run/wrappers/bin/mount";
in
pkgs.writeScriptBin "mount_wallets" ''
#!${shell}
if [ ! -b "${device}" ]; then
${pass} "${pw_name}" | ${sudo} ${cryptsetup} open "UUID=${uuid}" ${dev_name}
fi
${mkdir} -p \
"${home}/.walletwasabi" \
"${home}/.local/share/Bisq" \
"${home}/.bitmonero" \
"${home}/monero-storage" \
"${home}/.electrumfair"
${sudo} ${mount} ${device} -o subvol=@wasabi,${opts} "${home}/.walletwasabi"
${sudo} ${mount} ${device} -o subvol=@bisq,${opts} "${home}/.local/share/Bisq"
${sudo} ${mount} ${device} -o subvol=@monero/@bitmonero,${opts} "${home}/.bitmonero"
${sudo} ${mount} ${device} -o subvol=@monero/@monero-storage,${opts} "${home}/monero-storage"
${sudo} ${mount} ${device} -o subvol=@electrumfair,${opts} "${home}/.electrumfair"
''

View File

@ -1,20 +0,0 @@
{ dev_name, config, pkgs, ... }:
let
home = "${config.home.homeDirectory}";
shell = "${pkgs.dash}/bin/dash";
cryptsetup = "${pkgs.cryptsetup}/bin/cryptsetup";
sudo = "/run/wrappers/bin/sudo";
umount = "/run/wrappers/bin/umount";
in
pkgs.writeScriptBin "umount_wallets" ''
#!${shell}
${sudo} ${umount} --recursive "${home}/.walletwasabi"
${sudo} ${umount} --recursive "${home}/.local/share/Bisq"
${sudo} ${umount} --recursive "${home}/.bitmonero"
${sudo} ${umount} --recursive "${home}/monero-storage"
${sudo} ${umount} --recursive "${home}/.electrumfair"
${sudo} ${cryptsetup} close ${dev_name}
''