Switch to using .chezmoidata.yaml as source for plugin definitions

This commit is contained in:
Brian Zalewski 2023-09-04 01:46:01 -04:00 committed by GitHub
parent 547d7802e9
commit a673dbf002
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 255 additions and 235 deletions

View file

@ -770,6 +770,8 @@ softwareGroups:
- hiddenbar - hiddenbar
- keycastr - keycastr
- linkliar - linkliar
- logi-options-plus
- logi-tune
- mark-text - mark-text
- meetingbar - meetingbar
- modern-flyouts - modern-flyouts
@ -1572,14 +1574,233 @@ helm:
url: https://lablabs.github.io/cloudflare-exporter/ url: https://lablabs.github.io/cloudflare-exporter/
pkg: cloudflare-exporter/cloudflare-exporter pkg: cloudflare-exporter/cloudflare-exporter
softwarePlugins: softwarePlugins:
alfred:
cmd: null
plugins:
- https://github.com/BalliAsghar/mailsy-alfred/releases/download/2.0.0/Mailsy.alfredworkflow
android-studio:
cmd: bash -c 'if ! sdkmanager --list_installed | grep "{PLUGIN}" > /dev/null; then echo y | sdkmanager --install "{PLUGIN}"; fi'
plugins:
- add-ons;addon-google_apis-google-24
- build-tools;33.0.0
- cmake;3.22.1
- cmdline-tools;latest
- emulator
- extras;android;m2repository
- extras;google;auto
- extras;google;google_play_services
- extras;google;instantapps
- extras;google;m2repository
- extras;google;market_apk_expansion
- extras;google;market_licensing
- extras;google;simulators
- extras;google;webdriver
- extras;intel;Hardware_Accelerated_Execution_Manager
- extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2
- extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2
- ndk-bundle
- patcher;v4
- platform-tools
- platforms;android-31
- platforms;android-32
- platforms;android-33
- skiaparser;3
- sources;android-33
- system-images;android-31;default;x86_64
- system-images;android-32;android-desktop;x86_64
- system-images;android-33;android-tv;x86
- system-images;android-33;google-tv;x86
- system-images;android-33;google_apis;x86_64
- system-images;android-33;google_apis_playstore;x86_64
# - com.github.copilot # Unable to find a way to install automatically using CLI
composer:
cmd: null
plugins:
- deployer/deployer
docker: docker:
cmd: bash -c 'if ! docker extension list | grep "$(echo "{PLUGIN}" | sed 's/\:.*//')" > /dev/null; then echo y | docker extension install "{PLUGIN}"; fi'
plugins:
- ambassador/telepresence-docker-extension:1.0.13
- docker/disk-usage-extension:0.2.7
- docker/logs-explorer-extension:0.2.3
- docker/resource-usage-extension
- docker/volumes-backup-extension:1.1.4
- drone/drone-ci-docker-extension:0.2.0
- okteto/docker-desktop-extension:0.3.3
- portainer/portainer-docker-extension:2.18.4
- redhatdeveloper/openshift-dd-ext
- snyk/snyk-docker-desktop-extension
- tailscale/docker-extension:1.0.0
when: docker extension &>2 /dev/null
docker_images:
cmd: null
plugins:
- docker.io/nginx/unit
docker_plugins:
cmd: bash -c 'if ! docker plugin ls | grep "{PLUGIN}" > /dev/null; then docker plugin install "{PLUGIN}"; fi'
plugins: plugins:
- sapk/plugin-rclone - sapk/plugin-rclone
- vieux/sshfs - vieux/sshfs
# TODO Add Intellij missing plugins and fix install dotnet:
intellij: cmd: bash -c 'if ! dotnet tool list -g | grep "{PLUGIN}" > /dev/null; then dotnet tool install -g "{PLUGIN}"; fi'
plugins: plugins:
- microsoft.cst.attacksurfaceanalyzer.cli
- dotnet-format
- git-credential-manager
gcloud:
cmd: bash -c 'if ! gcloud components list | grep "Installed.*{PLUGIN}" > /dev/null; then echo "Installing.." && gcloud components install --quiet "{PLUGIN}"; fi'
plugins:
- app-engine-go
- cloud-datastore-emulator
- cloud-firestore-emulator
- cloud-run-proxy
- gke-gcloud-auth-plugin
- kubectl
- kustomize
- log-streaming
- minikube
- pubsub-emulator
- skaffold
- terraform-tools
update: gcloud components update
gh:
cmd: bash -c 'if [ -n "$GITHUB_TOKEN" ] && ! gh extension list | grep "{PLUGIN}" > /dev/null; then gh extension install "{PLUGIN}"; fi'
plugins:
- abdfnx/gh-tran
- dlvhdr/gh-dash
- github/gh-net
- mislav/gh-cp
intellij-idea-ce:
cmd: bash -c 'idea.sh installPlugins "{PLUGIN}"'
plugins:
- com.github.copilot
- https://plugins.jetbrains.com/plugin/17328-pieces--save-search-share--reuse-code-snippets - https://plugins.jetbrains.com/plugin/17328-pieces--save-search-share--reuse-code-snippets
helm:
cmd: bash -c '{PLUGIN}'
plugins:
- if ! helm plugin list | grep "Preview helm upgrade changes as a diff" > /dev/null; then helm plugin install https://github.com/databus23/helm-diff; fi
- if ! helm plugin list | grep "Query at a given interval a Prometheus, ElasticSearch or Sentry instance." > /dev/null; then helm plugin install https://github.com/ContainerSolutions/helm-monitor; fi
- if ! helm plugin list | grep "This plugin provides secrets values encryption for Helm charts secure storing" > /dev/null; then helm plugin install https://github.com/jkroepke/helm-secrets; fi
krew:
cmd: bash -c 'if ! kubectl krew list | grep "{PLUGIN}" > /dev/null; then kubectl krew install "{PLUGIN}"; fi'
plugins:
- access-matrix
- cert-manager
- cost
- ctx
- datree
- deprecations
- flyte
- get-all
- graph
- ingress-nginx
- karmada
- konfig
- kyverno
- liqo
- minio
- modify-secret
- neat
- node-shell
- nx
- oidc-login
- resource-capacity
- score
- sniff
- tail
- tree
- tunnel
- view-allocations
- virt
- warp
- who-can
raycast:
cmd: null
plugins:
- https://www.raycast.com/abielzulio/chatgpt
- https://www.raycast.com/BalliAsghar/mailsy
steampipe:
cmd: bash -c 'if [ ! -f /tmp/steampipe-plugin-list ]; then steampipe plugin list > /tmp/steampipe-plugin-list; fi && if ! cat /tmp/steampipe-plugin-list | grep "{PLUGIN}" > /dev/null; then steampipe plugin install "{PLUGIN}"; fi'
plugins:
- algolia
- aws
- azure
- azuread
- azuredevops
- bitbucket
- buildkite
- cloudflare
- code
- config
- consul
- csv
- digitalocean
- docker
- gcp
- github
- googledirectory
- googlesheets
- googleworkspace
- grafana
- heroku
- hibp
- imap
- ipinfo
- jira
- jumpcloud
- kubernetes
- ldap
- linkedin
- net
- nomad
- openai
- prometheus
- reddit
- rss
- sentry
- shopify
- slack
- stripe
- tailscale
- terraform
- trivy
- twilio
- whois
- ernw/openstack
- theapsgroup/gitlab
- theapsgroup/keycloak
- theapsgroup/vault
- twitter
update: steampipe plugin update --all
teams:
cmd: echo "Teams plugins are installed via the Teams app"
plugins:
- name: Pieces
plugin: https://teams.microsoft.com/l/app/789f23b3-d882-45ca-b3a3-de7f850656ea
vagrant:
cmd: bash -c 'if ! vagrant plugin list | grep "{PLUGIN}" > /dev/null; then vagrant plugin install "{PLUGIN}"; fi'
plugins:
- vagrant-bindfs
- vagrant-digitalocean
- vagrant-google
- vagrant-hostmanager
- vagrant-libvirt
# Dependency issues
# - vagrant-openstack-provider
# - vagrant-openstack
- vagrant-parallels
# Dependency issue
# - vagrant-proxmox
- vagrant-share
- vagrant-vbguest
- vagrant-vmware-desktop
- vagrant-xenserver
visual-studio:
cmd: null # VSIXInstaller.exe can be used to install a local file. The first step is to download the plugin file. https://gist.github.com/ScottHutchinson/b22339c3d3688da5c9b477281e258400
plugins:
- GitHub.copilotvs
- TemplateStudio.TemplateStudioForWinUICs
- lepo.wpf-ui
vim: vim:
plugins: plugins:
- https://github.com/airblade/vim-gitgutter.git - https://github.com/airblade/vim-gitgutter.git
@ -1609,6 +1830,15 @@ softwarePlugins:
- https://github.com/vim-airline/vim-airline.git - https://github.com/vim-airline/vim-airline.git
- https://github.com/vim-syntastic/syntastic.git - https://github.com/vim-syntastic/syntastic.git
- https://github.com/leafgarland/typescript-vim.git - https://github.com/leafgarland/typescript-vim.git
# Handled by script that looks at ~/.config/Code/extensions.json
# vscode:
# cmd: bash -c 'if ! code --list-extensions | grep "{PLUGIN}" > /dev/null; then code --install-extension "{PLUGIN}"; fi'
# plugins:
# - GitHub.copilot
# vscodium:
# cmd: bash -c 'if ! codium --list-extensions | grep "{PLUGIN}" > /dev/null; then codium --install-extension "{PLUGIN}"; fi'
# plugins:
# - GitHub.copilot
qubes: qubes:
dom0Packages: dom0Packages:
- bismuth - bismuth
@ -1646,7 +1876,6 @@ qubes:
- https://qubes.3isec.org/Templates_4.1/qubes-template-debian-12-4.0.6-202208292254.noarch.rpm - https://qubes.3isec.org/Templates_4.1/qubes-template-debian-12-4.0.6-202208292254.noarch.rpm
- https://qubes.3isec.org/Templates_4.1/qubes-template-jammy-4.0.6-202205012228.noarch.rpm - https://qubes.3isec.org/Templates_4.1/qubes-template-jammy-4.0.6-202205012228.noarch.rpm
perfectStack: perfectStack:
darwin: darwin:
- warp-terminal - warp-terminal

View file

@ -116,6 +116,7 @@ let installData
let installOrders = {} let installOrders = {}
let installMeta = {} let installMeta = {}
let binLinkRan = false let binLinkRan = false
let chezmoiData = []
let installOrdersPre = [] let installOrdersPre = []
let installOrdersPost = [] let installOrdersPost = []
let installOrdersService = [] let installOrdersService = []
@ -143,6 +144,12 @@ async function downloadInstallData() {
} }
} }
// Download the installation map
async function getChezmoiData() {
const text = fs.readFileSync(process.env.HOME + '/.local/share/chezmoi/home/.chezmoidata.yaml').toString()
return YAML.parse(text)
}
// Creates the installOrders object which maps package managers to arrays of packages to install // Creates the installOrders object which maps package managers to arrays of packages to install
let generateInstallOrderCount = 0 let generateInstallOrderCount = 0
async function generateInstallOrders(pkgsToInstall) { async function generateInstallOrders(pkgsToInstall) {
@ -428,7 +435,7 @@ async function generateInstallOrders(pkgsToInstall) {
} }
function processPluginOrders(pkg) { function processPluginOrders(pkg) {
const pluginMap = installData && installData.softwarePlugins && installData.softwarePlugins[pkg] const pluginMap = chezmoiData && chezmoiData.softwarePlugins && chezmoiData.softwarePlugins[pkg]
if (pluginMap) { if (pluginMap) {
if (pluginMap.cmd && pluginMap.plugins) { if (pluginMap.cmd && pluginMap.plugins) {
installOrdersPlugins.push({ package: pkg, cmd: pluginMap.cmd, plugins: pluginMap.plugins }) installOrdersPlugins.push({ package: pkg, cmd: pluginMap.cmd, plugins: pluginMap.plugins })
@ -1858,6 +1865,7 @@ async function installSoftware(pkgsToInstall) {
} }
log('info', 'Catalog Download', `Fetching the latest version of the installation map`) log('info', 'Catalog Download', `Fetching the latest version of the installation map`)
installData = await downloadInstallData() installData = await downloadInstallData()
chezmoiData = await getChezmoiData()
log('info', 'Filter', `Calculating the install orders`) log('info', 'Filter', `Calculating the install orders`)
await generateInstallOrders(pkgsToInstall ? pkgsToInstall : process.argv.slice(3)) await generateInstallOrders(pkgsToInstall ? pkgsToInstall : process.argv.slice(3))
const packageManagers = Object.keys(installOrders) const packageManagers = Object.keys(installOrders)

View file

@ -1126,6 +1126,20 @@ softwarePackages:
_name: Flake8 _name: Flake8
brew: flake8 brew: flake8
pipx: flake8 pipx: flake8
logi-options-plus:
_bin: logi-options-plus
_github: false
_name: Logi Options+
choco: logioptionsplus
cask: logi-options-plus
exe: https://download01.logi.com/web/ftp/pub/techsupport/optionsplus/logioptionsplus_installer.exe
winget: Logitech.OptionsPlus
logi-tune:
_bin: logi-tune
_github: false
_name: Logi Tune
dmg: https://software.vc.logitech.com/downloads/tune/LogiTuneInstaller.dmg
exe: https://software.vc.logitech.com/downloads/tune/LogiTuneInstall.exe
balenaetcher: balenaetcher:
_appImageName: balenaEtcher.AppImage _appImageName: balenaEtcher.AppImage
_bin: null _bin: null
@ -10804,234 +10818,3 @@ softwarePackages:
flatseal: flatseal:
_bin: flatseal _bin: flatseal
flatpak: com.github.tchx84.Flatseal flatpak: com.github.tchx84.Flatseal
softwarePlugins:
alfred:
cmd: null
plugins:
- https://github.com/BalliAsghar/mailsy-alfred/releases/download/2.0.0/Mailsy.alfredworkflow
android-studio:
cmd: bash -c 'if ! sdkmanager --list_installed | grep "{PLUGIN}" > /dev/null; then echo y | sdkmanager --install "{PLUGIN}"; fi'
plugins:
- add-ons;addon-google_apis-google-24
- build-tools;33.0.0
- cmake;3.22.1
- cmdline-tools;latest
- emulator
- extras;android;m2repository
- extras;google;auto
- extras;google;google_play_services
- extras;google;instantapps
- extras;google;m2repository
- extras;google;market_apk_expansion
- extras;google;market_licensing
- extras;google;simulators
- extras;google;webdriver
- extras;intel;Hardware_Accelerated_Execution_Manager
- extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2
- extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2
- ndk-bundle
- patcher;v4
- platform-tools
- platforms;android-31
- platforms;android-32
- platforms;android-33
- skiaparser;3
- sources;android-33
- system-images;android-31;default;x86_64
- system-images;android-32;android-desktop;x86_64
- system-images;android-33;android-tv;x86
- system-images;android-33;google-tv;x86
- system-images;android-33;google_apis;x86_64
- system-images;android-33;google_apis_playstore;x86_64
# - com.github.copilot # Unable to find a way to install automatically using CLI
composer:
cmd: null
plugins:
- deployer/deployer
docker:
cmd: bash -c 'if ! docker extension list | grep "$(echo "{PLUGIN}" | sed 's/\:.*//')" > /dev/null; then echo y | docker extension install "{PLUGIN}"; fi'
plugins:
- ambassador/telepresence-docker-extension:1.0.13
- docker/disk-usage-extension:0.2.7
- docker/logs-explorer-extension:0.2.3
- docker/resource-usage-extension
- docker/volumes-backup-extension:1.1.4
- drone/drone-ci-docker-extension:0.2.0
- okteto/docker-desktop-extension:0.3.3
- portainer/portainer-docker-extension:2.18.4
- redhatdeveloper/openshift-dd-ext
- snyk/snyk-docker-desktop-extension
- tailscale/docker-extension:1.0.0
when: docker extension &>2 /dev/null
dockerImages:
cmd: null
plugins:
- docker.io/nginx/unit
dotnet:
cmd: bash -c 'if ! dotnet tool list -g | grep "{PLUGIN}" > /dev/null; then dotnet tool install -g "{PLUGIN}"; fi'
plugins:
- microsoft.cst.attacksurfaceanalyzer.cli
- dotnet-format
- git-credential-manager
gcloud:
cmd: bash -c 'if ! gcloud components list | grep "Installed.*{PLUGIN}" > /dev/null; then echo "Installing.." && gcloud components install --quiet "{PLUGIN}"; fi'
plugins:
- app-engine-go
- cloud-datastore-emulator
- cloud-firestore-emulator
- cloud-run-proxy
- gke-gcloud-auth-plugin
- kubectl
- kustomize
- log-streaming
- minikube
- pubsub-emulator
- skaffold
- terraform-tools
update: gcloud components update
gh:
cmd: bash -c 'if [ -n "$GITHUB_TOKEN" ] && ! gh extension list | grep "{PLUGIN}" > /dev/null; then gh extension install "{PLUGIN}"; fi'
plugins:
- abdfnx/gh-tran
- dlvhdr/gh-dash
- github/gh-net
- mislav/gh-cp
intellij-idea-ce:
cmd: bash -c 'idea.sh installPlugins "{PLUGIN}"'
plugins:
- com.github.copilot
helm:
cmd: bash -c '{PLUGIN}'
plugins:
- if ! helm plugin list | grep "Preview helm upgrade changes as a diff" > /dev/null; then helm plugin install https://github.com/databus23/helm-diff; fi
- if ! helm plugin list | grep "Query at a given interval a Prometheus, ElasticSearch or Sentry instance." > /dev/null; then helm plugin install https://github.com/ContainerSolutions/helm-monitor; fi
- if ! helm plugin list | grep "This plugin provides secrets values encryption for Helm charts secure storing" > /dev/null; then helm plugin install https://github.com/jkroepke/helm-secrets; fi
krew:
cmd: bash -c 'if ! kubectl krew list | grep "{PLUGIN}" > /dev/null; then kubectl krew install "{PLUGIN}"; fi'
plugins:
- access-matrix
- cert-manager
- cost
- ctx
- datree
- deprecations
- flyte
- get-all
- graph
- ingress-nginx
- karmada
- konfig
- kyverno
- liqo
- minio
- modify-secret
- neat
- node-shell
- nx
- oidc-login
- resource-capacity
- score
- sniff
- tail
- tree
- tunnel
- view-allocations
- virt
- warp
- who-can
raycast:
cmd: null
plugins:
- https://www.raycast.com/abielzulio/chatgpt
- https://www.raycast.com/BalliAsghar/mailsy
steampipe:
cmd: bash -c 'if [ ! -f /tmp/steampipe-plugin-list ]; then steampipe plugin list > /tmp/steampipe-plugin-list; fi && if ! cat /tmp/steampipe-plugin-list | grep "{PLUGIN}" > /dev/null; then steampipe plugin install "{PLUGIN}"; fi'
plugins:
- algolia
- aws
- azure
- azuread
- azuredevops
- bitbucket
- buildkite
- cloudflare
- code
- config
- consul
- csv
- digitalocean
- docker
- gcp
- github
- googledirectory
- googlesheets
- googleworkspace
- grafana
- heroku
- hibp
- imap
- ipinfo
- jira
- jumpcloud
- kubernetes
- ldap
- linkedin
- net
- nomad
- openai
- prometheus
- reddit
- rss
- sentry
- shopify
- slack
- stripe
- tailscale
- terraform
- trivy
- twilio
- whois
- ernw/openstack
- theapsgroup/gitlab
- theapsgroup/keycloak
- theapsgroup/vault
- twitter
update: steampipe plugin update --all
teams:
cmd: echo "Teams plugins are installed via the Teams app"
plugins:
- name: Pieces
plugin: https://teams.microsoft.com/l/app/789f23b3-d882-45ca-b3a3-de7f850656ea
vagrant:
cmd: bash -c 'if ! vagrant plugin list | grep "{PLUGIN}" > /dev/null; then vagrant plugin install "{PLUGIN}"; fi'
plugins:
- vagrant-bindfs
- vagrant-digitalocean
- vagrant-google
- vagrant-hostmanager
- vagrant-libvirt
# Dependency issues
# - vagrant-openstack-provider
# - vagrant-openstack
- vagrant-parallels
# Dependency issue
# - vagrant-proxmox
- vagrant-share
- vagrant-vbguest
- vagrant-vmware-desktop
- vagrant-xenserver
visual-studio:
cmd: null # VSIXInstaller.exe can be used to install a local file. The first step is to download the plugin file. https://gist.github.com/ScottHutchinson/b22339c3d3688da5c9b477281e258400
plugins:
- GitHub.copilotvs
- TemplateStudio.TemplateStudioForWinUICs
- lepo.wpf-ui
# Handled by script that looks at ~/.config/Code/extensions.json
# vscode:
# cmd: bash -c 'if ! code --list-extensions | grep "{PLUGIN}" > /dev/null; then code --install-extension "{PLUGIN}"; fi'
# plugins:
# - GitHub.copilot
# vscodium:
# cmd: bash -c 'if ! codium --list-extensions | grep "{PLUGIN}" > /dev/null; then codium --install-extension "{PLUGIN}"; fi'
# plugins:
# - GitHub.copilot