From 581e70042eda7f54f801552616a0cc03af3bc630 Mon Sep 17 00:00:00 2001 From: ChaotiCryptidz Date: Mon, 14 Feb 2022 17:45:46 +0000 Subject: [PATCH] ngrikpfx --- hosts/lappy/profiles/usb-automount.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hosts/lappy/profiles/usb-automount.nix b/hosts/lappy/profiles/usb-automount.nix index c1d9766..632fb1d 100644 --- a/hosts/lappy/profiles/usb-automount.nix +++ b/hosts/lappy/profiles/usb-automount.nix @@ -2,12 +2,10 @@ let usb_label = "my_usb"; usb_path = "/usb"; + keyPath = "/home/chaos/.ssh/id_ed25519"; onInsert = pkgs.writeShellScriptBin "usb-on-insert" '' umount /usb || true mount $(findfs LABEL=${usb_label}) -o rw,umask=600,uid=chaos,gid=root,fmask=0022,dmask=0022 ${usb_path} - touch /home/chaos/.ssh/id_ed25519 /home/chaos/.ssh/id_ed25519.pub - bindfs -n -r -p 0700 -o nonempty /usb/ssh-keys/chaos.priv /home/chaos/.ssh/id_ed25519 - bindfs -n -r -p 0700 -o nonempty /usb/ssh-keys/chaos.pub /home/chaos/.ssh/id_ed25519.pub ''; in { systemd.tmpfiles.rules = [ "d ${usb_path} - chaos root" ];