feat: add support for OP_SERVICE_ACCOUNT_TOKEN and enforce file permissions for ~/.op_sat
Some checks failed
Nix Format Check / check-format (push) Failing after 38s
Some checks failed
Nix Format Check / check-format (push) Failing after 38s
This commit is contained in:
parent
470b3e0dab
commit
6816f125eb
14
.bashrc
14
.bashrc
@ -104,6 +104,20 @@ else
|
||||
eval "$(starship init bash)"
|
||||
fi
|
||||
|
||||
# Read .op_sat
|
||||
if [ -f ~/.op_sat ]; then
|
||||
export OP_SERVICE_ACCOUNT_TOKEN=$(cat ~/.op_sat)
|
||||
|
||||
# Ensure .op_sat is 0600 and only readable by the owner
|
||||
if [ "$(stat -c %a ~/.op_sat)" != "600" ]; then
|
||||
echo "WARNING: ~/.op_sat is not 0600, please fix this!"
|
||||
fi
|
||||
|
||||
if [ "$(stat -c %U ~/.op_sat)" != "$(whoami)" ]; then
|
||||
echo "WARNING: ~/.op_sat is not owned by the current user, please fix this!"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Source nix home-manager
|
||||
if [ -f "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" ]; then
|
||||
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
|
||||
|
Loading…
x
Reference in New Issue
Block a user