Skip to content

Commit

Permalink
fix(apt-pkgs): Update ngrok keyring and package source list URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
entelecheia committed May 22, 2023
1 parent 7f0cbfb commit 030e244
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chezmoi/.chezmoidata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ packages:
keyring_file: packages.microsoft.gpg
keyring_url: https://packages.microsoft.com/keys/microsoft.asc
source_list_file: vscode.list
source_list_line: "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main"
source_list_line: "deb [arch=amd64,arm64,armhf signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main"
- name: code-cli
brew: true
- name: commitizen
Expand Down Expand Up @@ -125,8 +125,8 @@ packages:
pipx: true
- name: ngrok
snap: true
keyring_file: ngrok-archive-keyring.gpg
keyring_url: https://ngrok-agent.s3.amazonaws.com/ngrok.asc
gpg_key_file: ngrok.asc
gpg_key_url: https://ngrok-agent.s3.amazonaws.com/ngrok.asc
source_list_file: ngrok.list
source_list_line: "deb https://ngrok-agent.s3.amazonaws.com buster main"
- name: node
Expand Down
11 changes: 11 additions & 0 deletions chezmoi/dot_local/bin/executable_dotfiles-install-apt-pkgs.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ if [[ ! -f "${KEYRING_FILE}" ]]; then
fi
fi
{{ end }}
{{- if and (hasKey . "gpg_key_file") (.gpg_key_file) }}
GPG_KEY_FIE="/etc/apt/trusted.gpg.d/{{ .gpg_key_file }}"
GPG_KEY_URL="{{ .gpg_key_url }}"
if [[ ! -f "${GPG_KEY_FIE}" ]]; then
if [ "$USENAME" = "root" ]; then
c curl -s "${GPG_KEY_URL}" | tee "${GPG_KEY_FIE}"
else
c curl -s "${GPG_KEY_URL}" | sudo tee "${GPG_KEY_FIE}"
fi
fi
{{ end }}
{{- if and (hasKey . "apt_key_url") (.apt_key_url) }}
APT_KEY_URL="{{ .apt_key_url }}"
if [[ -n "${APT_KEY_URL}" ]]; then
Expand Down

0 comments on commit 030e244

Please sign in to comment.