2024-04-07 00:28:01 +05:30
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# This will soften the security of these dotfiles, allowing
|
|
|
|
# the default unpriveleged user with UID/GID of 1000 to edit ALL FILES
|
|
|
|
# in the dotfiles directory
|
|
|
|
|
|
|
|
# This mainly is just here to be used by some scripts
|
|
|
|
|
|
|
|
# Run this inside of ~/.dotfiles (or whatever directory you installed
|
|
|
|
# the dotfiles to)
|
|
|
|
|
|
|
|
# Run this as root!
|
|
|
|
|
|
|
|
# BTW, this assumes your user account has a UID/GID of 1000
|
|
|
|
|
|
|
|
# After running this, YOUR UNPRIVELEGED USER CAN MAKE EDITS TO
|
|
|
|
# IMPORTANT SYSTEM FILES WHICH MAY COMPROMISE THE SYSTEM AFTER
|
|
|
|
# RUNNING nixos-rebuild switch!
|
|
|
|
|
|
|
|
if [ "$#" = 1 ]; then
|
2024-04-14 20:10:46 +05:30
|
|
|
SCRIPT_DIR=$1;
|
2024-04-07 00:28:01 +05:30
|
|
|
else
|
2024-04-14 20:10:46 +05:30
|
|
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
2024-04-07 00:28:01 +05:30
|
|
|
fi
|
2024-04-14 20:10:46 +05:30
|
|
|
pushd $SCRIPT_DIR &> /dev/null;
|
2024-04-07 00:28:01 +05:30
|
|
|
chown -R 1000:users .;
|
|
|
|
popd &> /dev/null;
|