Skip to content

Instantly share code, notes, and snippets.

@Jaid
Last active August 24, 2022 13:29
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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