sane-private-{lock,unlock}: just defer to mount
This commit is contained in:
parent
00bf2f79cc
commit
4ee02151f4
|
@ -116,11 +116,12 @@ let
|
|||
private-lock = static-nix-shell.mkBash {
|
||||
pname = "sane-private-lock";
|
||||
src = ./src;
|
||||
pkgs = [ "util-linux.mount" ];
|
||||
};
|
||||
private-unlock = static-nix-shell.mkBash {
|
||||
pname = "sane-private-unlock";
|
||||
src = ./src;
|
||||
pkgs = [ "gocryptfs" ];
|
||||
pkgs = [ "util-linux.mount" ];
|
||||
};
|
||||
rcp = static-nix-shell.mkBash {
|
||||
pname = "sane-rcp";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash
|
||||
#!nix-shell -i bash -p util-linux.mount
|
||||
|
||||
sudo umount /home/colin/private
|
||||
umount /home/colin/private
|
||||
|
|
|
@ -1,16 +1,7 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p gocryptfs
|
||||
#!nix-shell -i bash -p util-linux.mount
|
||||
|
||||
set -ex
|
||||
|
||||
# mounts the directory formerly known as ~/private.
|
||||
# ALTERNATIVELY: `mount /mnt/persist/private`
|
||||
|
||||
mount=/mnt/persist/private
|
||||
cipher=/nix/persist/home/colin/private
|
||||
sudo mkdir -p "$mount"
|
||||
sudo chown colin:users "$mount"
|
||||
if [ ! -f "$mount/init" ]
|
||||
then
|
||||
gocryptfs "$cipher" "$mount"
|
||||
fi
|
||||
# TODO: the mountpoint isn't created as part of startup: why?
|
||||
sudo mkdir -p /mnt/persist/private
|
||||
sudo chown colin:users /mmt/persist/private
|
||||
mount /mnt/persist/private
|
||||
|
|
Loading…
Reference in New Issue
Block a user