From 38ef97b8f7bfb500bb2f8a206d9f398f6928f21e Mon Sep 17 00:00:00 2001 From: Brian Zalewski <59970525+ProfessorManhattan@users.noreply.github.com> Date: Sun, 9 Jul 2023 03:32:19 +0000 Subject: [PATCH] Latest --- .../universal/run_onchange_after_14-warp.sh.tmpl | 5 ----- .../universal/run_onchange_after_16-vnc.sh.tmpl | 2 -- .../universal/run_onchange_after_28-privoxy.sh.tmpl | 3 +++ .../universal/run_onchange_after_40-firefox.sh.tmpl | 13 ++++++------- .../run_onchange_after_82-kasm-workspaces.sh.tmpl | 2 +- home/dot_config/cloudflared/config.yaml | 4 ++++ software.yml | 1 - 7 files changed, 14 insertions(+), 16 deletions(-) create mode 100644 home/dot_config/cloudflared/config.yaml diff --git a/home/.chezmoiscripts/universal/run_onchange_after_14-warp.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_14-warp.sh.tmpl index 9cc161a1..0f3bd6b0 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_14-warp.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_14-warp.sh.tmpl @@ -148,11 +148,6 @@ elif command -v warp-cli > /dev/null; then fi fi - -if command -v git > /dev/null; then -# - - if command -v warp-cli > /dev/null; then ### Application certificate configuration diff --git a/home/.chezmoiscripts/universal/run_onchange_after_16-vnc.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_16-vnc.sh.tmpl index b4d45df7..53424895 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_16-vnc.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_16-vnc.sh.tmpl @@ -22,10 +22,8 @@ if [ -d /Applications ] && [ -d /System ]; then # Source: https://apple.stackexchange.com/questions/30238/how-to-enable-os-x-screen-sharing-vnc-through-ssh # To disable, run: sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off # Only enable when computer is not a corporate / work computer - {{ if (ne .host.work true) -}} logg info 'Enabling VNC using the `VNC_PASSWORD` variable which is `vncpass` when nothing is specified' sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -allowAccessFor -specifiedUsers -clientopts -setreqperm -reqperm yes -setvnclegacy -vnclegacy yes -setvncpw -vncpw {{- if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "VNC_PASSWORD")) }}{{ includeTemplate "secrets/VNC_PASSWORD" | decrypt | trim }}{{ else }}{{ default "vncpass" (env "VNC_PASSWORD") }}{{ end }} -restart -agent -privs -all -users {{ .user.name }} - {{- end }} else # System is Linux ### VNC set-up / configuration diff --git a/home/.chezmoiscripts/universal/run_onchange_after_28-privoxy.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_28-privoxy.sh.tmpl index fd76bc09..23be6f1a 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_28-privoxy.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_28-privoxy.sh.tmpl @@ -34,6 +34,9 @@ if command -v privoxy > /dev/null; then if [ -d "$PRIVOXY_CONFIG_DIR" ]; then sudo cp -f "${XDG_CONFIG_HOME:-HOME/.config}/privoxy/config" "$PRIVOXY_CONFIG" sudo chmod 600 "$PRIVOXY_CONFIG" + if command -v add-user > /dev/null; then + sudo add-user privoxy + fi sudo chown privoxy:privoxy "$PRIVOXY_CONFIG" # @description Restart Privoxy after configuration is applied diff --git a/home/.chezmoiscripts/universal/run_onchange_after_40-firefox.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_40-firefox.sh.tmpl index 6b65e91e..cdc7a917 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_40-firefox.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_40-firefox.sh.tmpl @@ -78,7 +78,7 @@ for SETTINGS_DIR in "$HOME/snap/firefox/common/.mozilla/firefox" "$HOME/.var/app logg info "Processing Firefox profile location $SETTINGS_DIR" unset FIREFOX_EXE if [ "$SETTINGS_DIR" == "$HOME/.var/app/org.mozilla.firefox" ]; then - if ! command -v org.mozilla.firefox > /dev/null; then + if ! command -v org.mozilla.firefox > /dev/null || [ ! -d "$HOME/.var/app/org.mozilla.firefox" ]; then continue else FIREFOX_EXE="$(which org.mozilla.firefox)" @@ -106,14 +106,14 @@ for SETTINGS_DIR in "$HOME/snap/firefox/common/.mozilla/firefox" "$HOME/.var/app fi fi elif [ "$SETTINGS_DIR" == "$HOME/.var/app/io.gitlab.librewolf-community/.librewolf" ]; then - if ! command -v io.gitlab.librewolf-community > /dev/null; then + if ! command -v io.gitlab.librewolf-community > /dev/null || [ ! -d "$HOME/.var/app/io.gitlab.librewolf-community" ]; then continue else FIREFOX_EXE="$(which io.gitlab.librewolf-community)" fi elif [ "$SETTINGS_DIR" == "$HOME/Library/Application Support/Firefox/Profiles" ]; then FIREFOX_EXE="/Applications/Firefox.app/Contents/MacOS/firefox" - if [ ! -f "$FIREFOX_EXE" ]; then + if [ ! -f "$FIREFOX_EXE" ] || [ ! -d /Applications ]; then continue else ### Download Firefox Profile Switcher @@ -131,12 +131,12 @@ for SETTINGS_DIR in "$HOME/snap/firefox/common/.mozilla/firefox" "$HOME/.var/app fi elif [ "$SETTINGS_DIR" == "$HOME/Library/Application Support/LibreWolf/Profiles" ]; then FIREFOX_EXE="/Applications/LibreWolf.app/Contents/MacOS/librewolf" - if [ ! -f "$FIREFOX_EXE" ]; then + if [ ! -f "$FIREFOX_EXE" ] || [ ! -d /Applications ]; then continue fi elif [ "$SETTINGS_DIR" == "$HOME/snap/firefox/common/.mozilla/firefox" ]; then FIREFOX_EXE="/snap/bin/firefox" - if [ ! -f "$FIREFOX_EXE" ]; then + if [ ! -f "$FIREFOX_EXE" ] || [ ! -d "$HOME/snap/firefox" ]; then continue else ### Firefox Profile Switcher @@ -243,8 +243,7 @@ for SETTINGS_DIR in "$HOME/snap/firefox/common/.mozilla/firefox" "$HOME/.var/app git pull origin master else logg info 'Cloning the public Firefox git profile' - cd "$SETTINGS_DIR" - git clone {{ .firefoxPublicProfile }} profile.git + cd "$SETTINGS_DIR" && git clone {{ .firefoxPublicProfile }} profile.git fi ### Copy user.js to profile.git profile diff --git a/home/.chezmoiscripts/universal/run_onchange_after_82-kasm-workspaces.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_82-kasm-workspaces.sh.tmpl index feacf2ee..d97feec2 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_82-kasm-workspaces.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_82-kasm-workspaces.sh.tmpl @@ -8,6 +8,6 @@ {{ includeTemplate "universal/profile" }} {{ includeTemplate "universal/logg" }} -logg info 'Coming soon..' +logg info 'Kasm Workspaces coming soon..' {{ end -}} diff --git a/home/dot_config/cloudflared/config.yaml b/home/dot_config/cloudflared/config.yaml new file mode 100644 index 00000000..1765e02e --- /dev/null +++ b/home/dot_config/cloudflared/config.yaml @@ -0,0 +1,4 @@ +tunnel: The tunnel UUID +credentials-file: /path/your-tunnels-credentials-file.json +warp-routing: + enabled: true \ No newline at end of file diff --git a/software.yml b/software.yml index d902b649..45611b22 100644 --- a/software.yml +++ b/software.yml @@ -7215,7 +7215,6 @@ softwarePackages: _name: FirewallD _service: firewalld _pre: if command -v ufw > /dev/null; then sudo ufw disable; fi - _service: firewalld _notes: https://computingforgeeks.com/install-and-use-firewalld-on-ubuntu/ apt: firewalld dnf: firewalld