From dd2d11af32317b230cfc2d8f44a3823aae770919 Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Sat, 12 Nov 2022 16:45:31 +0100 Subject: [PATCH] remobed wasabi wallet and added electrum --- home/nixos-common.nix | 2 +- home/wallets/default.nix | 19 ++---------------- home/wallets/mount_wallets.nix | 34 --------------------------------- home/wallets/umount_wallets.nix | 20 ------------------- 4 files changed, 3 insertions(+), 72 deletions(-) delete mode 100644 home/wallets/mount_wallets.nix delete mode 100644 home/wallets/umount_wallets.nix diff --git a/home/nixos-common.nix b/home/nixos-common.nix index 48b7798..1d8afdf 100644 --- a/home/nixos-common.nix +++ b/home/nixos-common.nix @@ -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" diff --git a/home/wallets/default.nix b/home/wallets/default.nix index c474130..09ba9c6 100644 --- a/home/wallets/default.nix +++ b/home/wallets/default.nix @@ -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 ]; } diff --git a/home/wallets/mount_wallets.nix b/home/wallets/mount_wallets.nix deleted file mode 100644 index 11e1a18..0000000 --- a/home/wallets/mount_wallets.nix +++ /dev/null @@ -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" - '' diff --git a/home/wallets/umount_wallets.nix b/home/wallets/umount_wallets.nix deleted file mode 100644 index 1c534d1..0000000 --- a/home/wallets/umount_wallets.nix +++ /dev/null @@ -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} - ''