2022-12-19 09:09:08 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
2021-07-18 08:27:19 +01:00
|
|
|
umount-vault = pkgs.writeTextFile {
|
|
|
|
name = "umount-vault";
|
|
|
|
executable = true;
|
|
|
|
destination = "/bin/umount-vault";
|
|
|
|
text = ''
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
VERACRYPT="veracrypt"
|
|
|
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
|
|
VERACRYPT="/Applications/VeraCrypt.app/Contents/MacOS/VeraCrypt"
|
|
|
|
fi
|
|
|
|
$VERACRYPT -t -d
|
|
|
|
'';
|
|
|
|
};
|
2022-12-19 09:09:08 +00:00
|
|
|
in {home.packages = with pkgs; [umount-vault];}
|