keepass and global beekeeper
This commit is contained in:
@@ -1,47 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Get the original user's home directory and username
|
|
||||||
USER_HOME=$(eval echo ~${SUDO_USER:-$USER})
|
|
||||||
SSH_KEY="$USER_HOME/.ssh/id_ed25519"
|
|
||||||
|
|
||||||
MOUNT_POINT="$HOME/forge_mount"
|
|
||||||
REMOTE_SERVER="forge@167.172.100.32:/"
|
|
||||||
|
|
||||||
# Ensure SSH key has the correct permissions
|
|
||||||
if [ "$(stat -c %a "$SSH_KEY")" -ne 600 ]; then
|
|
||||||
echo "Warning: SSH key permissions are not secure (expected 600)."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Create the mount point if it doesn't exist
|
|
||||||
mkdir -p "$MOUNT_POINT"
|
|
||||||
|
|
||||||
# Debugging: Print the SSHFS command before running it
|
|
||||||
echo "Running SSHFS with command:"
|
|
||||||
echo "sshfs -o IdentityFile=\"$SSH_KEY\" \"$REMOTE_SERVER\" \"$MOUNT_POINT\""
|
|
||||||
|
|
||||||
# Mount the remote server
|
|
||||||
if sshfs -o IdentityFile="$SSH_KEY" "$REMOTE_SERVER" "$MOUNT_POINT"; then
|
|
||||||
echo "SSHFS mount successful."
|
|
||||||
else
|
|
||||||
echo "SSHFS mount failed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check if the mount was successful
|
|
||||||
if ! mountpoint -q "$MOUNT_POINT"; then
|
|
||||||
echo "Failed to mount $REMOTE_SERVER"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Successfully mounted $REMOTE_SERVER at $MOUNT_POINT"
|
|
||||||
|
|
||||||
# Change to the mounted directory
|
|
||||||
cd "$MOUNT_POINT" || {
|
|
||||||
echo "Failed to navigate to $MOUNT_POINT"
|
|
||||||
fusermount -u "$MOUNT_POINT"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Keep the shell open to interact with the mounted directory
|
|
||||||
trap 'fusermount -u "$MOUNT_POINT"; exit' SIGINT SIGTERM
|
|
||||||
exec "${SHELL:-/bin/bash}"
|
|
||||||
@@ -17,6 +17,9 @@ in {
|
|||||||
"size 843 650,initialTitle:(floatcal)"
|
"size 843 650,initialTitle:(floatcal)"
|
||||||
"move 100%-w-20 40,initialTitle:(floatcal)"
|
"move 100%-w-20 40,initialTitle:(floatcal)"
|
||||||
#windowrulev2 = move 1708 32,class:(floatcal)
|
#windowrulev2 = move 1708 32,class:(floatcal)
|
||||||
|
"float,class:(org.keepassxc.KeePassXC)"
|
||||||
|
"size 843 500,class:(org.keepassxc.KeePassXC)"
|
||||||
|
"move 100%-w-20 40,class:(org.keepassxc.KeePassXC)"
|
||||||
|
|
||||||
# RANGER/NNN SETTINGS
|
# RANGER/NNN SETTINGS
|
||||||
"float,class:(floatranger)"
|
"float,class:(floatranger)"
|
||||||
@@ -27,8 +30,6 @@ in {
|
|||||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||||
"suppressevent maximize, class:.* # You'll probably like this."
|
"suppressevent maximize, class:.* # You'll probably like this."
|
||||||
#windowrulev2 = noshadow, floating:0
|
#windowrulev2 = noshadow, floating:0
|
||||||
"float,class:^(org.keepassxc.KeePassXC)$"
|
|
||||||
"center,class:^(org.keepassxc.KeePassXC)$"
|
|
||||||
"float,class:^(imv)$"
|
"float,class:^(imv)$"
|
||||||
"float,class:^(com.github.hluk.copyq)$"
|
"float,class:^(com.github.hluk.copyq)$"
|
||||||
"float,class:^(blueman-manager)$"
|
"float,class:^(blueman-manager)$"
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ in {
|
|||||||
"size 843 650,initialTitle:(floatcal)"
|
"size 843 650,initialTitle:(floatcal)"
|
||||||
"move 100%-w-20 40,initialTitle:(floatcal)"
|
"move 100%-w-20 40,initialTitle:(floatcal)"
|
||||||
#windowrulev2 = move 1708 32,class:(floatcal)
|
#windowrulev2 = move 1708 32,class:(floatcal)
|
||||||
|
"float,class:(org.keepassxc.KeePassXC)"
|
||||||
|
"size 843 500,class:(org.keepassxc.KeePassXC)"
|
||||||
|
"move 100%-w-20 40,class:(org.keepassxc.KeePassXC)"
|
||||||
|
|
||||||
# RANGER/NNN SETTINGS
|
# RANGER/NNN SETTINGS
|
||||||
"float,class:(floatranger)"
|
"float,class:(floatranger)"
|
||||||
@@ -27,8 +30,6 @@ in {
|
|||||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||||
"suppressevent maximize, class:.* # You'll probably like this."
|
"suppressevent maximize, class:.* # You'll probably like this."
|
||||||
#windowrulev2 = noshadow, floating:0
|
#windowrulev2 = noshadow, floating:0
|
||||||
"float,class:^(org.keepassxc.KeePassXC)$"
|
|
||||||
"center,class:^(org.keepassxc.KeePassXC)$"
|
|
||||||
"float,class:^(imv)$"
|
"float,class:^(imv)$"
|
||||||
"float,class:^(com.github.hluk.copyq)$"
|
"float,class:^(com.github.hluk.copyq)$"
|
||||||
"float,class:^(blueman-manager)$"
|
"float,class:^(blueman-manager)$"
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ in {
|
|||||||
"size 843 650,initialTitle:(floatcal)"
|
"size 843 650,initialTitle:(floatcal)"
|
||||||
"move 100%-w-20 40,initialTitle:(floatcal)"
|
"move 100%-w-20 40,initialTitle:(floatcal)"
|
||||||
#windowrulev2 = move 1708 32,class:(floatcal)
|
#windowrulev2 = move 1708 32,class:(floatcal)
|
||||||
|
"float,class:(org.keepassxc.KeePassXC)"
|
||||||
|
"size 843 500,class:(org.keepassxc.KeePassXC)"
|
||||||
|
"move 100%-w-20 40,class:(org.keepassxc.KeePassXC)"
|
||||||
|
|
||||||
# RANGER/NNN SETTINGS
|
# RANGER/NNN SETTINGS
|
||||||
"float,class:(floatranger)"
|
"float,class:(floatranger)"
|
||||||
@@ -27,8 +30,6 @@ in {
|
|||||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||||
"suppressevent maximize, class:.* # You'll probably like this."
|
"suppressevent maximize, class:.* # You'll probably like this."
|
||||||
#windowrulev2 = noshadow, floating:0
|
#windowrulev2 = noshadow, floating:0
|
||||||
"float,class:^(org.keepassxc.KeePassXC)$"
|
|
||||||
"center,class:^(org.keepassxc.KeePassXC)$"
|
|
||||||
"float,class:^(imv)$"
|
"float,class:^(imv)$"
|
||||||
"float,class:^(com.github.hluk.copyq)$"
|
"float,class:^(com.github.hluk.copyq)$"
|
||||||
"float,class:^(blueman-manager)$"
|
"float,class:^(blueman-manager)$"
|
||||||
|
|||||||
@@ -67,6 +67,8 @@
|
|||||||
corectrl.enable = false;
|
corectrl.enable = false;
|
||||||
microfetch.enable = true;
|
microfetch.enable = true;
|
||||||
nix-ld.enable = false;
|
nix-ld.enable = false;
|
||||||
|
misc.enable = true;
|
||||||
|
npm.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user