rework scripts to install packages more declaratively

This commit is contained in:
Anthony Rodriguez 2024-06-17 09:22:52 +02:00
parent 1b3d363169
commit 5b43e25369
9 changed files with 58 additions and 35 deletions

View file

@ -0,0 +1,18 @@
packages:
linux:
fedora:
- bat
- codium
- fish
- fzf
- keychain
- neovim
- starship
- https://proton.me/download/PassDesktop/linux/x64/ProtonPass.rpm
flatpaks:
- com.getpostman.Postman
- com.spotify.Client
- one.ablaze.floorp
copr:
- atim/starship

30
.chezmoidata/vscode.yaml Normal file
View file

@ -0,0 +1,30 @@
vscode:
extensions:
- 42crunch.vscode-openapi
- aaron-bond.better-comments
- alexisvt.flutter-snippets
- asvetliakov.vscode-neovim
- biomejs.biome
- catppuccin.catppuccin-vsc
- catppuccin.catppuccin-vsc-icons
- codeium.codeium
- darkriszty.markdown-table-prettify
- dart-code.dart-code
- dart-code.flutter
- eamodio.gitlens
- editorconfig.editorconfig
- icrawl.discord-vscode
- jebbs.plantuml
- jirkavrba.subway-surfers
- naumovs.color-highlight
- oven.bun-vscode
- pdconsec.vscode-print
- prisma.prisma
- redhat.vscode-yaml
- rust-lang.rust-analyzer
- shan.code-settings-sync
- tamasfe.even-better-toml
- wix.vscode-import-cost
- yzane.markdown-pdf
- yzhang.markdown-all-in-one

View file

@ -1,12 +0,0 @@
bat
codium
codium
fd-find
fish
fzf
gtk-murrine-engine
https://proton.me/download/bridge/protonmail-bridge-3.8.2-1.x86_64.rpm
keychain
neovim
starship

View file

@ -1,2 +0,0 @@
com.getpostman.Postman
com.spotify.Client

View file

@ -1,2 +0,0 @@
#!/bin/sh
xargs -n1 -P4 codium --install-extension < {{ .chezmoi.sourceDir }}/vscode-extensions.txt

View file

@ -1,6 +0,0 @@
#!/bin/sh
# allow gtk themes to work with flatpaks
sudo flatpak override --filesystem=$HOME/.themes
sudo flatpak override --filesystem=$HOME/.icons
xargs -a {{ .chezmoi.sourceDir -}}/flatpaks flatpak install

View file

@ -1,21 +1,10 @@
#!/bin/sh
#!/bin/bash
{{ if eq .flavor "desktop" }}
{{ if eq .chezmoi.osRelease.id "fedora" }}
# add codium
sudo rpmkeys --import https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg
printf "[gitlab.com_paulcarroty_vscodium_repo]\nname=download.vscodium.com\nbaseurl=https://download.vscodium.com/rpms/\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg\nmetadata_expire=1h" | sudo tee -a /etc/yum.repos.d/vscodium.repo
# add starship copr
sudo dnf copr enable atim/starship -y
# install packages
sudo dnf check-update
sudo dnf install $(cat {{ .chezmoi.sourceDir -}}/fedora_packages) -y
sudo dnf install -y {{ .packages.linux.fedora | join " " -}}
{{ end }}
{{ end }}
{{ if (and (eq .flavor "wm") (eq .chezmoi.osRelease.id "arch")) }}
# TODO add arch packages (1password for GPG, vscode for chezmoi edit)
sudo pacman -Sy - < arch_packages
{{ end }}

View file

@ -0,0 +1,2 @@
#!/bin/bash
flatpak install -y --user {{ .packages.linux.flatpaks | join " " -}}

View file

@ -0,0 +1,6 @@
#!/bin/sh
{{ range .vscode.extensions }}
codium --install-extension {{ . | quote }} &
{{ end }}
wait