Update 15 files

- /home/.chezmoitemplates/secrets/key-sendgrid-api-key
- /home/.chezmoidata.yaml
- /home/dot_config/postfix/private_sasl_passwd.tmpl
- /home/dot_config/postfix/main.cf
- /home/dot_config/slack-term/config.tmpl
- /home/dot_config/tabby/config.yaml.tmpl
- /home/dot_config/warp/private_mdm.xml.tmpl
- /home/dot_config/samba/config.tmpl
- /home/dot_config/npm/npmrc.tmpl
- /home/dot_config/ngrok/ngrok.yml.tmpl
- /home/dot_config/rclone/merge_private_rclone.conf.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_05-postfix.sh.tmpl
- /home/.chezmoitemplates/secrets/SENDGRID_API_KEY
- /docs/TODO.md
- /software.yml
This commit is contained in:
Brian Zalewski 2023-04-19 12:13:42 +00:00
parent 62ed0d317c
commit 0932f983b8
15 changed files with 151 additions and 21 deletions

View file

@ -8,6 +8,17 @@ https://github.com/rigoneri/Syte3
✖ ERROR Gsettings Failed to apply gsetting ✖ ERROR Gsettings Failed to apply gsetting
Error: Command failed: gsettings set org.gnome.desktop.interface color-scheme prefer-dark Error: Command failed: gsettings set org.gnome.desktop.interface color-scheme prefer-dark
No such key “color-scheme” No such key “color-scheme”
# Skate!
# RUNDECK
# Foreman?
# FOG
# AMANDA
# CloudStack
# AppScale
# resilio connect
# oVirt
# opennebula
# emailengine.app
CLOUDFLARE_API_TOKEN CLOUDFLARE_API_TOKEN
GMAIL_APP_PASSWORD GMAIL_APP_PASSWORD

View file

@ -588,7 +588,6 @@ softwareGroups:
- secretive - secretive
- standard-notes - standard-notes
- stats - stats
- temps
- teamviewer - teamviewer
Misc-Development-Tools: &Misc-Development-Tools Misc-Development-Tools: &Misc-Development-Tools
- ansifilter - ansifilter
@ -765,6 +764,7 @@ softwareGroups:
- ots - ots
- share - share
- syncthing - syncthing
- lsyncd
Transfer-Desktop: &Transfer-Desktop Transfer-Desktop: &Transfer-Desktop
- ariang - ariang
- dat-desktop - dat-desktop
@ -1166,6 +1166,8 @@ softwareGroups:
- plymouth - plymouth
- chromium - chromium
- astronvim - astronvim
# macOS menu bar app for weather - little bit buggy
- temps
- asdf - asdf
# editly NPM package is failing to install on macOS - attempts to compile with node-gyp # editly NPM package is failing to install on macOS - attempts to compile with node-gyp
- editly - editly

View file

@ -0,0 +1,74 @@
{{- if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "ANSIBLE_GALAXY_TOKEN")) }}{{ includeTemplate "secrets/ANSIBLE_GALAXY_TOKEN" | decrypt }}{{ else }}{{ env "ANSIBLE_GALAXY_TOKEN" }}{{ end }}
#!/usr/bin/env bash
# @file SendGrid Postfix Configuration
# @brief Configures Postfix to use SendGrid as a relay host so you can use the `mail` program to send e-mail from the command-line
# @description
# This script follows the instructions from [SendGrid's documentation on integrating Postfix](https://docs.sendgrid.com/for-developers/sending-email/postfix).
# After this script runs, you should be able to send outgoing e-mails using SendGrid as an SMTP handler. In other words, you will
# be able to use the `mail` CLI command to send e-mails. The following is an example mailing the contents of `~/.bashrc` to `name@email.com`:
#
# ```shell
# cat ~/.bashrc | mail -s "My subject" name@email.com
# ```
{{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }}
if command -v postfix > /dev/null; then
### Ensure dependencies are installed
if command -v apt > /dev/null; then
logg info 'Installing libsasl2-modules'
sudo apt-get update
sudo apt-get install -y libsasl2-modules || EXIT_CODE=$?
elif command -v dnf > /dev/null; then
sudo dnf install -y cyrus-sasl-plain || EXIT_CODE=$?
elif command -v yum > /dev/null; then
sudo yum install -y cyrus-sasl-plain || EXIT_CODE=$?
fi
if [ -n "$EXIT_CODE" ]; then
logg warn 'There was an error ensuring the Postfix-SendGrid dependencies were installed'
fi
if [ -d /etc/postfix ]; then
### Add the SendGrid Postfix settings to the Postfix configuration
if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/postfix/main.cf" ]; then
CONFIG_FILE=/etc/postfix/main.cf
if cat "$CONFIG_FILE" | grep '### INSTALL DOCTOR MANAGED'; then
logg info 'Removing Install Doctor-managed block of code in /etc/postfix/main.cf block'
START_LINE="$(echo `grep -n -m 1 "### INSTALL DOCTOR MANAGED ### START" "$CONFIG_FILE" | cut -f1 -d ":"`)"
END_LINE="$(echo `grep -n -m 1 "### INSTALL DOCTOR MANAGED ### END" "$CONFIG_FILE" | cut -f1 -d ":"`)"
if command -v gsed > /dev/null; then
gsed -i "$START_LINE,$END_LINEd" "$CONFIG_FILE"
else
sed -i "$START_LINE,$END_LINEd" "$CONFIG_FILE"
fi
fi
### Add Postfix main configuration
logg "Adding configuration from ${XDG_CONFIG_HOME:-$HOME/.config}/postfix/main.cf to /etc/postfix/main.cf"
echo "" | sudo tee -a "$CONFIG_FILE"
cat "${XDG_CONFIG_HOME:-$HOME/.config}/postfix/main.cf" | sudo tee -a "$CONFIG_FILE"
fi
### Ensure proper permissions on `sasl_passwd` and update Postfix hashmaps
if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/postfix/sasl_passwd" ]; then
logg info "Copying file from ${XDG_CONFIG_HOME:-$HOME/.config}/postfix/sasl_passwd to /etc/postfix/sasl_passwd"
sudo cp -f "${XDG_CONFIG_HOME:-$HOME/.config}/postfix/sasl_passwd" /etc/postfix/sasl_passwd
logg info 'Assigning proper permissions to /etc/postfix/sasl_passwd'
sudo chmod 600 /etc/postfix/sasl_passwd
logg info 'Updating Postfix hashmaps for /etc/postfix/sasl_passwd'
sudo postmap /etc/postfix/sasl_passwd
fi
### Enable / restart postfix
logg info 'Enabling / restarting postfix'
sudo systemctl enable postfix
sudo systemctl restart postfix
else
logg warn '/etc/postfix is not a directory! Skipping SendGrid Postfix setup.'
fi
else
logg info 'Skipping Postfix configuration because Postfix is not installed'
fi
{{ end -}}

View file

@ -0,0 +1,8 @@
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA4Y2Z1V0oxVWhDVmljM2ZV
MkRjbmRJYlErVnNhbE5wL0Y2MWtvUnlWdGhnCmlpb1pzVWlZeVRFV05CY1dmbGg5
R1NwQlZOSU8zVFlySFBuRFBRbFJjMmsKLS0tIFZJOVdyakxNTDlVbGJ6a1dYcTR4
bU9wV1k4YTFQUU55SVJVT05LWFlMbzAKmueb+ABaperDOZUNq33GOTXYSd6+Ic7U
79CgsKP0kpNp5yQRddNPLBWsP3mnve6d556awgt3XgCwOUs/nsMrRMEgPVnTzana
tXh0aFzf9Ok9xatiJTUlPHFIk863EwPEEDaODf2E
-----END AGE ENCRYPTED FILE-----

View file

@ -1,8 +0,0 @@
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBRYlovRUc3UnNtbW83dUQ5
d0RwR284bTZMRStWNnJjZjhjUTNOVTlUc0ZJCi9VcEtRMzhkTFViY3M3cTJ2TlJo
WlZPenRLVjBGOVVBSVF5U255SWtiWTgKLS0tIEI4dm9BM1NsdjdaQ24vSjEweEZX
cUtZN2x1QmhxRG9vRHZ0N0tJY21Sc2sKxi6CxcuuyMA4Q9bPnl8gscmHiLwJb/UW
8qa+dPPVBt2X08mLVkpH2IbDC3l0LT6+mEtpJvRR1reH3ywlgi+6i2j3xBT6Wr34
ZFAc+U4uTQ+61ghoOhayeGrFFs+gQ4Af6D8KdfY=
-----END AGE ENCRYPTED FILE-----

View file

@ -1,4 +1,4 @@
{{- if (or (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "NGROK_AUTH_TOKEN")) (env "NGROK_AUTH_TOKEN")) -}} {{- if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (or (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "NGROK_AUTH_TOKEN")) (env "NGROK_AUTH_TOKEN")) -}}
version: "2" version: "2"
authtoken: '{{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "NGROK_AUTH_TOKEN")) }}{{ includeTemplate "secrets/NGROK_AUTH_TOKEN" | decrypt }}{{ else }}{{ env "NGROK_AUTH_TOKEN" }}{{ end }}' authtoken: '{{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "NGROK_AUTH_TOKEN")) }}{{- includeTemplate "secrets/NGROK_AUTH_TOKEN" | decrypt -}}{{ else }}{{- env "NGROK_AUTH_TOKEN" -}}{{ end }}'
{{- end -}} {{- end -}}

View file

@ -9,4 +9,4 @@ loglevel=error
network-concurrency=32 network-concurrency=32
prefix={{ .chezmoi.homeDir }}/.local/share/npm prefix={{ .chezmoi.homeDir }}/.local/share/npm
strict-peer-dependencies=false strict-peer-dependencies=false
//registry.npmjs.org/:_authToken={{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "NPM_TOKEN")) }}{{ includeTemplate "secrets/NPM_TOKEN" | decrypt }}{{ else if (env "NPM_TOKEN") }}{{ env "NPM_TOKEN" }}{{ else }}${NPM_TOKEN}{{ end }} //registry.npmjs.org/:_authToken={{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "NPM_TOKEN")) }}{{- includeTemplate "secrets/NPM_TOKEN" | decrypt -}}{{ else if (env "NPM_TOKEN") }}{{- env "NPM_TOKEN" -}}{{ else }}${NPM_TOKEN}{{ end }}

View file

@ -0,0 +1,17 @@
### INSTALL DOCTOR MANAGED ### START
# @file SendGrid Postfix configuration
# @brief Configures Postfix to use SendGrid as a relay host
# @description
# This configuration file is appended to `/etc/postfix/main.cf` by one of the scripts. It configures SendGrid
# as a relay host that Postfix can use. More details can be found in the
# [SendGrid documentation on integrating Postfix](https://docs.sendgrid.com/for-developers/sending-email/postfix).
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_security_level = encrypt
header_size_limit = 4096000
relayhost = [smtp.sendgrid.net]:587
### INSTALL DOCTOR MANAGED ### END

View file

@ -0,0 +1,3 @@
{{- if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (or (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "SENDGRID_API_KEY")) (env "SENDGRID_API_KEY")) -}}
[smtp.sendgrid.net]:587 apikey:{{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "SENDGRID_API_KEY")) }}{{ includeTemplate "secrets/SENDGRID_API_KEY" | decrypt }}{{ else }}{{ env "SENDGRID_API_KEY" }}{{ end }}
{{- end -}}

View file

@ -4,8 +4,8 @@
CONFIG_FILE="$HOME/.config/rclone/rclone.conf" CONFIG_FILE="$HOME/.config/rclone/rclone.conf"
if cat "$CONFIG_FILE" | grep '# MEGABYTE LABS MANAGED S3'; then if cat "$CONFIG_FILE" | grep '# MEGABYTE LABS MANAGED S3'; then
# TODO: Remove old block # TODO: Remove old block
START_LINE="$(echo `grep -n -m 1 "# MEGABYTE LABS MANAGED S3" .zshrc | cut -f1 -d ":"`)" START_LINE="$(echo `grep -n -m 1 "# MEGABYTE LABS MANAGED S3" "$CONFIG_FILE" | cut -f1 -d ":"`)"
END_LINE="$(echo `grep -n -m 1 "# MEGABYTE LABS MANAGED S3" .zshrc | cut -f1 -d ":"`)" END_LINE="$(echo `grep -n -m 1 "# MEGABYTE LABS MANAGED S3" "$CONFIG_FILE" | cut -f1 -d ":"`)"
if command -v gsed > /dev/null; then if command -v gsed > /dev/null; then
gsed -i "$START_LINE,$END_LINEd" "$CONFIG_FILE" gsed -i "$START_LINE,$END_LINEd" "$CONFIG_FILE"
else else

View file

@ -26,11 +26,13 @@
[Private] [Private]
browsable = yes browsable = yes
comment = Authenticated share with read/write capabilities (backed up to S3) comment = Authenticated share with read/write capabilities (backed up to S3)
follow symlinks = no follow symlinks = yes
guest only = no guest only = no
path = /mnt/samba-private path = /mnt/Network Share (Private)
public = no public = no
unix extension = yes
valid users = @sambausers valid users = @sambausers
wide links = yes
writable = true writable = true
[Public] [Public]
@ -38,7 +40,7 @@
comment = Public folder provided for file sharing on the LAN (backed up to S3) comment = Public folder provided for file sharing on the LAN (backed up to S3)
follow symlinks = no follow symlinks = no
guest only = yes guest only = yes
path = /mnt/samba-public path = /mnt/Network Share (Public)
public = yes public = yes
writable = yes writable = yes

View file

@ -1,5 +1,5 @@
{ {
"slack_token": "{{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "SLACK_API_TOKEN")) }}{{ includeTemplate "secrets/SLACK_API_TOKEN" | decrypt }}{{ else }}{{ env "SLACK_API_TOKEN" }}{{ end }}", "slack_token": "{{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "SLACK_API_TOKEN")) }}{{- includeTemplate "secrets/SLACK_API_TOKEN" | decrypt -}}{{ else }}{{- env "SLACK_API_TOKEN" -}}{{ end }}",
"sidebar_width": 3, "sidebar_width": 3,
"notify": "mention", "notify": "mention",
"emoji": true, "emoji": true,

View file

@ -1,5 +1,5 @@
{{- if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "files" "tabby")) -}} {{- if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "files" "tabby")) -}}
{{ includeTemplate "files/tabby" | decrypt -}} {{- includeTemplate "files/tabby" | decrypt -}}
{{ else -}} {{ else -}}
version: 3 version: 3
profiles: [] profiles: []

View file

@ -13,8 +13,8 @@
<key>support_url</key> <key>support_url</key>
<string>https://megabyte.space</string> <string>https://megabyte.space</string>
<key>auth_client_id</key> <key>auth_client_id</key>
<string>{{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_TEAMS_CLIENT_ID")) }}{{ includeTemplate "secrets/CLOUDFLARE_TEAMS_CLIENT_ID" | decrypt }}{{ else }}{{ env "CLOUDFLARE_TEAMS_CLIENT_ID" }}{{ end }}</string> <string>{{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_TEAMS_CLIENT_ID")) }}{{- includeTemplate "secrets/CLOUDFLARE_TEAMS_CLIENT_ID" | decrypt -}}{{ else }}{{- env "CLOUDFLARE_TEAMS_CLIENT_ID" -}}{{ end }}</string>
<key>auth_client_secret</key> <key>auth_client_secret</key>
<string>{{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_TEAMS_CLIENT_SECRET")) }}{{ includeTemplate "secrets/CLOUDFLARE_TEAMS_CLIENT_SECRET" | decrypt }}{{ else }}{{ env "CLOUDFLARE_TEAMS_CLIENT_SECRET" }}{{ end }}</string> <string>{{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_TEAMS_CLIENT_SECRET")) }}{{- includeTemplate "secrets/CLOUDFLARE_TEAMS_CLIENT_SECRET" | decrypt -}}{{ else }}{{- env "CLOUDFLARE_TEAMS_CLIENT_SECRET" -}}{{ end }}</string>
</dict> </dict>
{{ end -}} {{ end -}}

View file

@ -7195,6 +7195,17 @@ softwarePackages:
_type: cli _type: cli
brew: spectralops/tap/teller brew: spectralops/tap/teller
github: github.com/tellerops/teller github: github.com/tellerops/teller
lsyncd:
_bin: lsyncd
_desc: Lsyncd (Live Syncing Daemon) synchronizes local directories with remote targets (via SSH and more)
_docs: https://lsyncd.github.io/lsyncd/
_github: https://github.com/lsyncd/lsyncd
_home: false
_name: Lsyncd
apt: lsyncd
dnf: lsyncd
pacman: lsyncd
brew: lsyncd
temps: temps:
_bin: null _bin: null
_desc: Simple menubar application based on Electron with actual weather information and forecast _desc: Simple menubar application based on Electron with actual weather information and forecast
@ -7230,6 +7241,16 @@ softwarePackages:
snap: termius-app snap: termius-app
yay: termius yay: termius
_type: application _type: application
postfix:
_bin: postfix
_desc: Postfix is an e-mail server that can be used to send e-mail
_docs: https://www.postfix.org/documentation.html
_github: https://github.com/vdukhovni/postfix
_home: https://www.postfix.org/
_name: Postfix
apt: postfix
dnf: postfix
pacman: postfix
terraform: terraform:
_deps: _deps:
- tfenv - tfenv