Update 17 files

- /software.yml
- /home/.chezmoidata.yaml
- /home/private_dot_config/dconf/settings/org.gnome.desktop.applications
- /home/private_dot_config/dconf/settings/org.gnome.desktop.background
- /home/private_dot_config/dconf/settings/org.gnome.desktop.calendar
- /home/private_dot_config/dconf/settings/org.gnome.desktop.interface
- /home/private_dot_config/dconf/settings/org.gnome.desktop.privacy
- /home/private_dot_config/dconf/settings/org.gnome.desktop.session
- /home/private_dot_config/dconf/settings/org.gnome.desktop.sound
- /home/private_dot_config/dconf/settings/org.gnome.desktop.wm.preferences
- /home/private_dot_config/dconf/settings/org.gnome.settings-daemon.plugins.power
- /home/private_dot_config/dconf/settings/org.gnome.shell
- /home/private_dot_config/dconf/settings/system.proxy
- /home/private_dot_config/dconf/settings/org.gnome.desktop.app-folders
- /home/.chezmoiscripts/universal/run_onchange_after_21-import-dconf-settings.tmpl
- /home/dot_local/bin/executable_backup-dconf.tmpl
- /home/dot_local/bin/executable_install-program
This commit is contained in:
Brian Zalewski 2023-01-10 00:06:45 +00:00
parent bc54e851b2
commit 08f39fc10c
17 changed files with 68 additions and 4 deletions

View file

@ -553,6 +553,7 @@ softwareGroups:
- envchain
- envconsul
- pony
- protonvpn-cli
- skate
- ssh-vault
- stubby

View file

@ -0,0 +1,29 @@
{{- if eq .host.distro.family "linux" -}}
#!/usr/bin/env bash
{{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }}
### Backup system settings
DCONF_TMP="$(mktemp)"
dconf dump / > "$DCONF_TMP"
logg info 'Backed up system dconf settings to '"$DCONF_TMP"
### Reset system settings / load saved configurations from ~/.config/dconf/settings
if [ -d "$XDG_CONFIG_HOME/dconf/settings" ]; then
find "$XDG_CONFIG_HOME/dconf/settings" -mindepth 1 -maxdepth 1 -type f | while read DCONF_CONFIG_FILE; do
DCONF_SETTINGS_ID="/$(basename "$DCONF_CONFIG_FILE" | sed 's/\./\//')"
# Reset dconf settings if environment variable RESET_DCONF is set to true
if [ "$RESET_DCONF" == 'true' ]; then
logg info 'Resetting dconf settings for `'"$DCONF_SETTINGS_ID"'`'
dconf reset -f "$DCONF_SETTINGS_ID"
fi
logg info 'Loading versioned dconf settings for `'"$DCONF_SETTINGS_ID"'`'
dconf load "$DCONF_SETTINGS_ID" < "$DCONF_CONFIG_FILE"
logg success 'Finished applying dconf settings for `'"$DCONF_SETTINGS_ID"'`'
done
else
logg warn '~/.config/dconf/settings does not exist!'
fi
{{ end -}}

View file

@ -0,0 +1,27 @@
{{- if eq .host.distro.family "linux" -}}
#!/usr/bin/env bash
{{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }}
### Create backups
if [ -d "$XDG_CONFIG_HOME/dconf/settings" ]; then
DCONF_TMP="$(mktemp)"
logg info 'Moving ~/.config/dconf/settings to '"$DCONF_TMP"
mv "$XDG_CONFIG_HOME/dconf/settings" "$DCONF_TMP"
fi
### Ensure ~/.config/dconf/settings exists
mkdir -p "$XDG_CONFIG_HOME/dconf/settings"
### Overwrite ~/.config/dconf/settings configurations so we can diff with Chezmoi
find "$XDG_CONFIG_HOME/dconf/settings" -mindepth 1 -maxdepth 1 -type f | while read DCONF_CONFIG_FILE; do
DCONF_SETTINGS_ID="/$(basename "$DCONF_CONFIG_FILE" | sed 's/\./\//')/"
logg info 'Dumping `'"$DCONF_SETTINGS_ID"'` to '"$DCONF_CONFIG_FILE"
dconf dump "$DCONF_SETTINGS_ID" > "$DCONF_CONFIG_FILE"
logg success 'Saved new configuration to '"$DCONF_CONFIG_FILE"
logg info 'Printing diff for '"$DCONF_CONFIG_FILE"
chezmoi diff "$DCONF_CONFIG_FILE"
done
{{ end -}}

View file

@ -1146,7 +1146,7 @@ async function installPackageList(packageManager, packages) {
if (unbuffer) {
unbufferPrefix = 'unbuffer'
}
const verboseMode = process.env.DEBUG_MODE === 'on' ? 'vv' : ''
const verboseMode = process.env.DEBUG_MODE === 'true' ? 'vv' : ''
if (osPlatform === 'darwin' || osPlatform === 'linux' || osPlatform === 'windows') {
await $`ANSIBLE_CONFIG=${process.env.HOME}/.local/share/ansible/ansible.cfg ansible 127.0.0.1 -v${verboseMode} -e '{ ansible_connection: "local", ansible_become_user: "root", ansible_user: "${process.env.USER}", ansible_family: "${osPlatform}", install_homebrew: False }' -m include_role -a name=${pkg}`
log('success', 'Install', `${pkg} successfully installed via ${packageManager}`)

View file

@ -5173,18 +5173,25 @@ softwarePackages:
scoop: procs
snap: procs
protonvpn:
_bin: null
_bin: protonvpn
_desc: '[Proton](https://www.proton.org/) is a free and open-source raster graphics editor used for image manipulation and image editing, free-form drawing, transcoding between different image file formats, and more specialized tasks. Proton is released under GPLv3+ license and is available for Linux, macOS, and Microsoft Windows.'
_docs: https://protonmail.com/support/
_github: https://github.com/ProtonMail/WebClients
_home: https://protonmail.com/
_name: Proton
_name: ProtonVPN
_when:cask: '! test -d /Applications/ProtonVPN.app'
ansible: professormanhattan.proton
cask: protonvpn
choco: protonvpn
dnf: protonvpn-cli
yay: protonvpn
protonvpn-cli:
_bin: protonvpn-cli
_desc: null
_docs: null
_github: null
_home: null
_name: ProtonVPN CLI
_todo: Populate this once the ProtonVPN CLI is released to the package managers
protonmail-bridge:
_bin: protonmail-bridge
_when:cask: '! test -d "/Applications/Proton Mail Bridge.app"'