21 lines
664 B
Nix
21 lines
664 B
Nix
{ 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}
|
|
''
|