Moved src into share in .local folder

This commit is contained in:
Brian Zalewski 2023-08-01 07:05:52 +00:00
parent b2311d02de
commit d26291b87d
40 changed files with 69 additions and 70 deletions

View file

@ -304,6 +304,7 @@ softwareGroups:
- rsync
- sd
- solargraph
- speedtest-cli
- sql-language-server
- task
- tea

View file

@ -40,23 +40,23 @@
refreshPeriod = "{{ $refreshPeriod }}"
### Betelgeuse Theme
[".local/src/betelgeuse"]
[".local/share/betelgeuse"]
type = "git-repo"
url = "https://gitlab.com/megabyte-labs/misc/betelgeuse.git"
clone.args = ["--depth", "1"]
pull.args = ["--ff-only"]
[".local/src/candy-icons"]
[".local/share/candy-icons"]
type = "git-repo"
url = "https://github.com/ProfessorManhattan/candy-icons.git"
clone.args = ["--depth", "1"]
pull.args = ["--ff-only"]
[".local/src/yoru"]
[".local/share/yoru"]
type = "git-repo"
url = "https://github.com/rxyhn/yoru.git"
refreshPeriod = "{{ $refreshPeriod }}"
clone.args = ["--depth", "1"]
pull.args = ["--ff-only"]
[".local/src/dracula"]
[".local/share/dracula"]
type = "git-repo"
url = "https://github.com/dracula/dracula-theme.git"
refreshPeriod = "{{ $refreshPeriod }}"
@ -166,15 +166,13 @@
pull.args = ["--ff-only"]
{{- end }}
{{- if (lookPath "pipx") }}
### Netdata Speedtest
### Netdata Speedtest (required for Netdata speedtest plugin)
[".local/share/netdata-speedtest"]
type = "git-repo"
url = "https://github.com/ohthehugemanatee/netdata-speedtest.git"
refreshPeriod = "{{ $refreshPeriod }}"
clone.args = ["--depth", "1"]
pull.args = ["--ff-only"]
{{- end }}
### Git Template
# [".config/git/template/_/husky.sh"]
@ -189,7 +187,7 @@
refreshPeriod = "{{ $refreshPeriod }}"
### Taskfiles
[".local/src/shared-common"]
[".local/share/shared-common"]
type = "git-repo"
url = "https://gitlab.com/megabyte-labs/common/shared.git"
clone.args = ["--depth", "1"]
@ -209,7 +207,7 @@
refreshPeriod = "{{ $refreshPeriod }}"
### Chef Bento
[".local/src/bento"]
[".local/share/bento"]
type = "git-repo"
url = "https://github.com/installdoc/bento.git"
refreshPeriod = "{{ $refreshPeriod }}"
@ -217,7 +215,7 @@
pull.args = ["--ff-only"]
### Git Fuzzy
[".local/src/git-fuzzy"]
[".local/share/git-fuzzy"]
type = "git-repo"
url = "https://github.com/bigH/git-fuzzy.git"
refreshPeriod = "{{ $refreshPeriod }}"
@ -225,12 +223,12 @@
pull.args = ["--ff-only"]
### Ansible Roles / Playbook
[".local/src/gas-station"]
[".local/share/gas-station"]
type = "git-repo"
url = "https://gitlab.com/megabyte-labs/gas-station.git"
clone.args = ["--depth", "1"]
pull.args = ["--ff-only"]
[".local/src/ansible-qubes"]
[".local/share/ansible-qubes"]
type = "git-repo"
url = "https://github.com/ProfessorManhattan/ansible-qubes.git"
refreshPeriod = "{{ $refreshPeriod }}"
@ -247,12 +245,12 @@
### Application Styles
# Discord (TODO: Apply this to Discord automatically)
[".local/src/fluent/discord/theme.css"]
[".local/share/fluent/discord/theme.css"]
type = "file"
url = "https://raw.githubusercontent.com/DiscordStyles/Fluent/deploy/Fluent.theme.css"
refreshPeriod = "{{ $refreshPeriod }}"
# Steam (TODO: Apply this to Steam automatically by detecting first if it is installed)
[".local/src/fluent/steam"]
[".local/share/fluent/steam"]
type = "git-repo"
url = "https://github.com/purogamer/Fluent-for-Steam.git"
refreshPeriod = "{{ $refreshPeriod }}"
@ -260,43 +258,43 @@
pull.args = ["--ff-only"]
### Packer
[".local/src/packer/archlinux"]
[".local/share/packer/archlinux"]
type = "git-repo"
url = "https://gitlab.com/megabyte-labs/packer/archlinux-desktop.git"
clone.args = ["--depth", "1"]
pull.args = ["--ff-only"]
[".local/src/packer/centos"]
[".local/share/packer/centos"]
type = "git-repo"
url = "https://gitlab.com/megabyte-labs/packer/centos-desktop.git"
clone.args = ["--depth", "1"]
pull.args = ["--ff-only"]
[".local/src/packer/debian"]
[".local/share/packer/debian"]
type = "git-repo"
url = "https://gitlab.com/megabyte-labs/packer/debian-desktop.git"
clone.args = ["--depth", "1"]
pull.args = ["--ff-only"]
[".local/src/packer/fedora"]
[".local/share/packer/fedora"]
type = "git-repo"
url = "https://gitlab.com/megabyte-labs/packer/fedora-desktop.git"
clone.args = ["--depth", "1"]
pull.args = ["--ff-only"]
[".local/src/packer/macos"]
[".local/share/packer/macos"]
type = "git-repo"
url = "https://gitlab.com/megabyte-labs/packer/macos-desktop.git"
clone.args = ["--depth", "1"]
pull.args = ["--ff-only"]
[".local/src/packer/ubuntu"]
[".local/share/packer/ubuntu"]
type = "git-repo"
url = "https://gitlab.com/megabyte-labs/packer/ubuntu-desktop.git"
clone.args = ["--depth", "1"]
pull.args = ["--ff-only"]
[".local/src/packer/windows"]
[".local/share/packer/windows"]
type = "git-repo"
url = "https://gitlab.com/megabyte-labs/packer/windows-desktop.git"
clone.args = ["--depth", "1"]
pull.args = ["--ff-only"]
# https://github.com/kholia/OSX-KVM
[".local/src/osx-kvm"]
[".local/share/osx-kvm"]
type = "git-repo"
url = "https://github.com/kholia/OSX-KVM.git"
clone.args = ["--depth", "1"]
@ -310,7 +308,7 @@
pull.args = ["--ff-only"]
### JumpUSB
[".local/src/jumpusb"]
[".local/share/jumpusb"]
type = "git-repo"
url = "https://gitlab.com/megabyte-labs/jumpusb.git"
clone.args = ["--depth", "1"]

View file

@ -12,7 +12,7 @@
{{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }}
{{ $gitHooks := (output "find" (joinPath .chezmoi.homeDir ".local" "src" "shared-common" "common" ".config" "husky") "-mindepth" "1" "-maxdepth" "1" "-type" "f") -}}
{{ $gitHooks := (output "find" (joinPath .chezmoi.homeDir ".local" "share" "shared-common" "common" ".config" "husky") "-mindepth" "1" "-maxdepth" "1" "-type" "f") -}}
{{- range $gitHook := splitList "\n" $gitHooks -}}
{{- if ne $gitHook "" -}}
# {{ $gitHook }} hash: {{ include $gitHook | sha256sum }}
@ -25,7 +25,7 @@ mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/git/template/hooks"
### Ensure git hooks are executable
logg info 'Ensuring git hooks are up-to-date'
find "$HOME/.local/src/shared-common/common/.config/husky" -mindepth 1 -maxdepth 1 -type f | while read HOOK; do
find "${XDG_DATA_HOME:-$HOME/.local/share}/shared-common/common/.config/husky" -mindepth 1 -maxdepth 1 -type f | while read HOOK; do
cp "$HOOK" "${XDG_CONFIG_HOME:-$HOME/.config}/git/template/hooks"
done

View file

@ -31,7 +31,7 @@
logg info 'Ensuring Gas Station roles are symlinked to ~/.local/share/ansible/roles'
mkdir -p "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/roles"
find "$HOME/.local/src/gas-station/roles" -mindepth 2 -maxdepth 2 -type d | while read ROLE_PATH; do
find "${XDG_DATA_HOME:-$HOME/.local/share}/gas-station/roles" -mindepth 2 -maxdepth 2 -type d | while read ROLE_PATH; do
ROLE_FOLDER="professormanhattan.$(echo "$ROLE_PATH" | sed 's/.*\/\([^\/]*\)$/\1/')"
ALT_ROLE_FOLDER="$(echo "$ROLE_PATH" | sed 's/.*\/\([^\/]*\)$/\1/')"
if [ ! -d "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/roles/$ROLE_FOLDER" ] || [ "$(readlink -f "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/roles/$ROLE_FOLDER")" != "$ROLE_PATH" ]; then
@ -45,7 +45,7 @@ find "$HOME/.local/src/gas-station/roles" -mindepth 2 -maxdepth 2 -type d | whil
fi
done
if [ -f "$HOME/.local/src/gas-station/requirements.yml" ]; then
if [ -f "${XDG_DATA_HOME:-$HOME/.local/share}/gas-station/requirements.yml" ]; then
### Install Ansible Galaxy and dependencies if missing
if ! command -v ansible-galaxy > /dev/null; then
if ! command -v pipx > /dev/null; then
@ -73,15 +73,15 @@ if [ -f "$HOME/.local/src/gas-station/requirements.yml" ]; then
ansible-galaxy install -r "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/requirements.yml" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg error 'Failed to install Ansible requirements from Ansible Galaxy'
if [ -d "$HOME/.local/src/gas-station/collections" ]; then
if [ -d "${XDG_DATA_HOME:-$HOME/.local/share}/gas-station/collections" ]; then
logg info 'Attempting to use locally stored Ansible requirements'
cd "$HOME/.local/src/gas-station/collections"
cd "${XDG_DATA_HOME:-$HOME/.local/share}/gas-station/collections"
ansible-galaxy install -r requirements.yml || SECOND_EXIT_CODE=$?
if [ -n "$SECOND_EXIT_CODE" ]; then
logg error 'Failed to install requirements from both the cloud and the local copy' && exit 1
fi
else
logg warn '~/.local/src/gas-station/collections is missing'
logg warn "${XDG_DATA_HOME:-$HOME/.local/share}/gas-station/collections is missing"
fi
fi
else

View file

@ -31,9 +31,9 @@ fi
### Copy theme files over to /usr/local/share
if [ -d "$HOME/.local/src/{{ .theme | lower }}/share" ]; then
logg info 'Copying ~/.local/src/{{ .theme | lower }}/share to /usr/local/share'
sudo rsync --chown=root:root --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r -artvu --inplace "$HOME/.local/src/betelgeuse/share/" "/usr/local/share/" > /dev/null
sudo rsync --chown=root:root --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r -artvu --inplace "${XDG_DATA_HOME:-$HOME/.local/share}/betelgeuse/share/" "/usr/local/share/" > /dev/null
else
logg warn '~/.local/src/betelgeuse/share is missing'
logg warn '~/.local/share/betelgeuse/share is missing'
fi
### Flatten GRUB theme files (i.e. convert symlinks to regular files)

View file

@ -9,8 +9,8 @@
# Betelgeuse-macOS wallpaper hash: {{ include (joinPath .chezmoi.homeDir ".local" "src" "betelgeuse" "share" "wallpapers" "Betelgeuse-macOS" "contents" "source.png") | sha256sum }}
### Set macOS wallpaper
if command -v m > /dev/null && [ -f "$HOME/.local/src/betelgeuse/share/wallpapers/Betelgeuse-macOS/contents/source.png" ]; then
m wallpaper "$HOME/.local/src/betelgeuse/share/wallpapers/Betelgeuse-macOS/contents/source.png"
if command -v m > /dev/null && [ -f "${XDG_DATA_HOME:-$HOME/.local/share}/betelgeuse/share/wallpapers/Betelgeuse-macOS/contents/source.png" ]; then
m wallpaper "${XDG_DATA_HOME:-$HOME/.local/share}/betelgeuse/share/wallpapers/Betelgeuse-macOS/contents/source.png"
else
logg warn 'Either `m` or the macOS default wallpaper is missing.'
fi

View file

@ -32,8 +32,8 @@ fi
### Merge latest Candy icons into the Betelgeuse icon theme
if command -v rsync > /dev/null; then
if [ -d "$HOME/.local/src/candy-icons" ] && [ -d /usr/local/share/icons/Candy ]; then
sudo rsync --chown=root:root --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r -artu --inplace --exclude .git/ "$HOME/.local/src/candy-icons/" "/usr/local/share/icons/Candy/"
if [ -d "${XDG_DATA_HOME:-$HOME/.local/share}/candy-icons" ] && [ -d /usr/local/share/icons/Candy ]; then
sudo rsync --chown=root:root --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r -artu --inplace --exclude .git/ "${XDG_DATA_HOME:-$HOME/.local/share}/candy-icons/" "/usr/local/share/icons/Candy/"
else
logg warn 'Skipping synchronization of Candy icons since either the target or destination folder is not present'
fi

View file

@ -91,8 +91,8 @@ if [ "$BASH_SUPPORT" = 'true' ]; then
#fi
### git-fuzzy
if [ -d "$HOME/.local/src/git-fuzzy/bin" ]; then
export PATH="$HOME/.local/src/git-fuzzy/bin:$PATH"
if [ -d "$XDG_DATA_HOME/git-fuzzy/bin" ]; then
export PATH="$XDG_DATA_HOME/git-fuzzy/bin:$PATH"
fi
### MOTD

View file

@ -72,7 +72,7 @@ tasks:
Qubes can leverage the assets generated from the VirtualBox builds to power HVMs.
cmds:
- |
cd "$HOME/.local/src/bento"
cd "$HOME/.local/share/bento"
packer init -upgrade ./packer_templates
logg info 'Building Ubuntu VirtualBox VMs'
packer build -var-file=os_pkrvars/ubuntu/ubuntu-22.04-x86_64.pkrvars.hcl ./packer_templates

View file

@ -4,7 +4,7 @@ if command -v task > /dev/null && [ -n "$PATH_TASK" ]; then
if [ -f Taskfile.yml ]; then
$PATH_TASK $*
else
$PATH_TASK --taskfile "$HOME/.local/src/shared-common/common/Taskfile.yml" $@
$PATH_TASK --taskfile "${XDG_DATA_HOME:-$HOME/.local/share}/shared-common/common/Taskfile.yml" $@
fi
else
echo 'task is not installed or PATH_TASK is not defined.' && exit 1

View file

@ -1,3 +1,3 @@
{{- if (eq .host.qubes true) -}}
{{ .host.home }}/.local/src/ansible-qubes/bin/bombshell-client
{{ .host.home }}/.local/share/ansible-qubes/bin/bombshell-client
{{- end -}}

View file

@ -1,4 +1,4 @@
{{- if (eq .host.qubes true) -}}
{{ .host.home }}/.local/src/ansible-qubes/bin/qrun
{{ .host.home }}/.local/share/ansible-qubes/bin/qrun
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if (eq .host.qubes true) -}}
{{ .host.home }}/.local/src/ansible-qubes/bin/qssh
{{ .host.home }}/.local/share/ansible-qubes/bin/qssh
{{- end -}}

View file

@ -1,4 +1,4 @@
{{- if (eq .host.qubes true) -}}
{{ .host.home }}/.local/src/ansible-qubes/bin/qssh
{{ .host.home }}/.local/share/ansible-qubes/bin/qssh
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if .host.qubes -}}
{{ .host.home }}/.local/src/ansible-qubes/action_plugins/commonlib.py
{{ .host.home }}/.local/share/ansible-qubes/action_plugins/commonlib.py
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if .host.qubes -}}
{{ .host.home }}/.local/src/ansible-qubes/action_plugins/qubes_pass.py
{{ .host.home }}/.local/share/ansible-qubes/action_plugins/qubes_pass.py
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if .host.qubes -}}
{{ .host.home }}/.local/src/ansible-qubes/action_plugins/qubesformation.py
{{ .host.home }}/.local/share/ansible-qubes/action_plugins/qubesformation.py
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if .host.qubes -}}
{{ .host.home }}/.local/src/ansible-qubes/action_plugins/qubesguid.py
{{ .host.home }}/.local/share/ansible-qubes/action_plugins/qubesguid.py
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if .host.qubes -}}
{{ .host.home }}/.local/src/ansible-qubes/action_plugins/qubessls.py
{{ .host.home }}/.local/share/ansible-qubes/action_plugins/qubessls.py
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if .host.qubes -}}
{{ .host.home }}/.local/src/ansible-qubes/connection_plugins/qubes.py
{{ .host.home }}/.local/share/ansible-qubes/connection_plugins/qubes.py
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if .host.qubes -}}
{{ .host.home }}/.local/src/ansible-qubes/library/qubes_pass.py
{{ .host.home }}/.local/share/ansible-qubes/library/qubes_pass.py
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if .host.qubes -}}
{{ .host.home }}/.local/src/ansible-qubes/library/qubesformation.py
{{ .host.home }}/.local/share/ansible-qubes/library/qubesformation.py
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if .host.qubes -}}
{{ .host.home }}/.local/src/ansible-qubes/library/qubesguid.py
{{ .host.home }}/.local/share/ansible-qubes/library/qubesguid.py
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if .host.qubes -}}
{{ .host.home }}/.local/src/ansible-qubes/library/qubessls.py
{{ .host.home }}/.local/share/ansible-qubes/library/qubessls.py
{{- end -}}

View file

@ -1,4 +1,4 @@
{{- if .host.qubes -}}
{{ .host.home }}/.local/src/ansible-qubes/lookup_plugins/jq.py
{{ .host.home }}/.local/share/ansible-qubes/lookup_plugins/jq.py
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if .host.qubes -}}
{{ .host.home }}/.local/src/ansible-qubes/lookup_plugins/qubes-pass.py
{{ .host.home }}/.local/share/ansible-qubes/lookup_plugins/qubes-pass.py
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if eq .host.distro.family "linux" -}}
{{ .host.home }}/.local/src/betelgeuse/share/kde4/apps/desktoptheme/default
{{ .host.home }}/.local/share/betelgeuse/share/kde4/apps/desktoptheme/default
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if eq .host.distro.family "linux" -}}
{{ .host.home }}/.local/src/betelgeuse/share/Kvantum
{{ .host.home }}/.local/share/betelgeuse/share/Kvantum
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if eq .host.distro.family "linux" -}}
{{ .host.home }}/.local/src/betelgeuse/share/aurorae
{{ .host.home }}/.local/share/betelgeuse/share/aurorae
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if eq .host.distro.family "linux" -}}
{{ .host.home }}/.local/src/betelgeuse/share/color-schemes
{{ .host.home }}/.local/share/betelgeuse/share/color-schemes
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if eq .host.distro.family "linux" -}}
{{ .host.home }}/.local/src/betelgeuse/share/grub
{{ .host.home }}/.local/share/betelgeuse/share/grub
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if eq .host.distro.family "linux" -}}
{{ .host.home }}/.local/src/betelgeuse/share/icons
{{ .host.home }}/.local/share/betelgeuse/share/icons
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if eq .host.distro.family "linux" -}}
{{ .host.home }}/.local/src/betelgeuse/share/konsole
{{ .host.home }}/.local/share/betelgeuse/share/konsole
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if eq .host.distro.family "linux" -}}
{{ .host.home }}/.local/src/betelgeuse/share/plasma
{{ .host.home }}/.local/share/betelgeuse/share/plasma
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if eq .host.distro.family "linux" -}}
{{ .host.home }}/.local/src/betelgeuse/share/plymouth
{{ .host.home }}/.local/share/betelgeuse/share/plymouth
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if eq .host.distro.family "linux" -}}
{{ .host.home }}/.local/src/betelgeuse/share/sddm
{{ .host.home }}/.local/share/betelgeuse/share/sddm
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if eq .host.distro.family "linux" -}}
{{ .host.home }}/.local/src/betelgeuse/share/sounds
{{ .host.home }}/.local/share/betelgeuse/share/sounds
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if eq .host.distro.family "linux" -}}
{{ .host.home }}/.local/src/betelgeuse/share/themes
{{ .host.home }}/.local/share/betelgeuse/share/themes
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if eq .host.distro.family "linux" -}}
{{ .host.home }}/.local/src/betelgeuse/share/wallpapers
{{ .host.home }}/.local/share/betelgeuse/share/wallpapers
{{- end -}}

View file

@ -1,3 +1,3 @@
{{- if eq .host.distro.family "linux" -}}
{{ .host.home }}/.local/src/betelgeuse/share/xfce4/terminal/colorschemes
{{ .host.home }}/.local/share/betelgeuse/share/xfce4/terminal/colorschemes
{{- end -}}