Skip to content

Instantly share code, notes, and snippets.

@Jaid
Last active Aug 24, 2022
Embed
What would you like to do?
.secrets file template for user home directory, sourced in ~/.bashrc and ~/.zshrc
#!/usr/bin/env bash
function add() {
regex="[[:space:]]+"
printf 'export %s=' "$1"
if [[ $2 =~ $regex ]]; then
printf %s "'$2'"
else
printf %s "$2"
fi
printf '\n'
}
# GitHub
add GITHUB_TOKEN ghp_000000000000000000000000000000000000
# samba, see https://github.com/Jaid/setup-server/blob/main/composes/samba/docker-compose.yml
add sambaPassword
# rsyncd
add RSYNC_PASSWORD
- target: .secrets
userHome: true
backupExisting: true
permissions: 700
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment