add support for Fedora linux

This commit is contained in:
2024-06-20 12:52:20 -04:00
parent e5c3667a18
commit 21d9b694ff
4 changed files with 14 additions and 1 deletions

View File

@@ -5,6 +5,11 @@ packages:
- curl - curl
- fish - fish
linux: linux:
dnfs:
- git-all
- curl
- bash
- fish
apts: apts:
- git - git
- curl - curl

View File

@@ -7,6 +7,8 @@ echo "[-] Running post-installation script [-]"
{{- if eq .chezmoi.osRelease.id "alpine" }} {{- if eq .chezmoi.osRelease.id "alpine" }}
echo "Alpine Linux detected" echo "Alpine Linux detected"
{{- else if eq .chezmoi.osRelease.id "fedora" }}
echo "Fedora Linux detected"
{{- else if (eq .chezmoi.osRelease.id "debian" "ubuntu" "zorin") }} {{- else if (eq .chezmoi.osRelease.id "debian" "ubuntu" "zorin") }}
echo "Debian-based Linux detected" echo "Debian-based Linux detected"

View File

@@ -6,6 +6,8 @@ echo "[-] Running pre-installation script [-]"
{{- if eq .chezmoi.osRelease.id "alpine" }} {{- if eq .chezmoi.osRelease.id "alpine" }}
echo "Alpine Linux detected" echo "Alpine Linux detected"
{{- else if eq .chezmoi.osRelease.idLike "fedora" }}
echo "Fedora Linux detected"
{{- else if (eq .chezmoi.osRelease.id "debian" "ubuntu" "zorin") }} {{- else if (eq .chezmoi.osRelease.id "debian" "ubuntu" "zorin") }}
echo "Debian-based Linux detected" echo "Debian-based Linux detected"

View File

@@ -11,6 +11,10 @@ apk update
{{ range .packages.linux.apks -}} {{ range .packages.linux.apks -}}
apk add {{ . | quote }} apk add {{ . | quote }}
{{ end -}} {{ end -}}
{{- else if eq .chezmoi.osRelease.idLike "fedora" }}
{{ range .packages.linux.dnfs -}}
sudo dnf install -y {{ . | quote }}
{{ end -}}
{{- else if (eq .chezmoi.osRelease.id "debian" "ubuntu" "zorin") }} {{- else if (eq .chezmoi.osRelease.id "debian" "ubuntu" "zorin") }}
echo "[-] Updating Apt packages [-]" echo "[-] Updating Apt packages [-]"
sudo apt update sudo apt update