24 lines
460 B
Nix
24 lines
460 B
Nix
|
{ config, pkgs, ... }:
|
||
|
|
||
|
let
|
||
|
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
|
||
|
'';
|
||
|
};
|
||
|
|
||
|
in
|
||
|
{
|
||
|
home.packages = with pkgs; [ umount-vault ];
|
||
|
}
|