### VIM
{{- $refreshPeriod := "240h" }}
{{- $vimPlugins := .softwarePlugins.vim.plugins }}
{{- range $vimPlugin := $vimPlugins }}
{{-   $folderName :=  trimSuffix ".git" (last (splitList "/" $vimPlugin)) }}
[".vim/plugged/{{ $folderName }}"]
    type = "git-repo"
    url = "{{ $vimPlugin }}"
    refreshPeriod = "{{ $refreshPeriod }}"
    clone.args = ["--depth", "1"]
    pull.args = ["--ff-only"]
{{- end }}
### coc.nvim VIM plugin requires custom branch "release"
[".vim/plugged/coc.nvim"]
    type = "git-repo"
    url = "https://github.com/neoclide/coc.nvim.git"
    refreshPeriod = "{{ $refreshPeriod }}"
    clone.args = ["--branch", "release", "--depth", "1"]
    pull.args = ["--ff-only"]

### Betelgeuse Theme
[".local/src/betelgeuse"]
    type = "git-repo"
    url = "https://gitlab.com/megabyte-labs/misc/betelgeuse.git"
    clone.args = ["--depth", "1"]
    pull.args = ["--ff-only"]
[".local/src/yoru"]
    type = "git-repo"
    url = "https://github.com/rxyhn/yoru.git"
    refreshPeriod = "{{ $refreshPeriod }}"
    clone.args = ["--depth", "1"]
    pull.args = ["--ff-only"]
[".local/src/dracula"]
    type = "git-repo"
    url = "https://github.com/dracula/dracula-theme.git"
    refreshPeriod = "{{ $refreshPeriod }}"
    clone.args = ["--depth", "1"]
    pull.args = ["--ff-only"]

### Shell
[".config/desktop/gnome.yml"]
    type = "file"
    url = "https://gitlab.com/megabyte-labs/gas-station/-/raw/master/environments/prod/group_vars/all/defaults.yml"
[".config/desktop/settings.yml"]
    type = "file"
    url = "https://gitlab.com/megabyte-labs/gas-station/-/raw/master/roles/system/theme/vars/main.yml"
[".config/helm/config.yml"]
    type = "file"
    url = "https://gitlab.com/megabyte-labs/gas-station/-/raw/master/environments/prod/group_vars/all/helm.yml"
    refreshPeriod = "{{ $refreshPeriod }}"
[".local/bash_it"]
    type = "git-repo"
    url = "https://github.com/Bash-it/bash-it.git"
    refreshPeriod = "{{ $refreshPeriod }}"
    clone.args = ["--depth", "1"]
    pull.args = ["--ff-only"]
[".config/shell/lscolors.sh"]
    type = "file"
    url = "https://raw.githubusercontent.com/trapd00r/LS_COLORS/master/lscolors.sh"
    refreshPeriod = "{{ $refreshPeriod }}"
[".config/tmux/tmux.conf"]
    type = "file"
    url = "https://raw.githubusercontent.com/gpakosz/.tmux/master/.tmux.conf"
    refreshPeriod = "{{ $refreshPeriod }}"
[".config/tmux/tmux.conf.local"]
    type = "file"
    url = "https://raw.githubusercontent.com/gpakosz/.tmux/master/.tmux.conf.local"
[".local/scripts/antigen.zsh"]
    type = "file"
    url = "https://raw.githubusercontent.com/zsh-users/antigen/develop/bin/antigen.zsh"
    refreshPeriod = "{{ $refreshPeriod }}"
[".local/scripts/fzf-git.bash"]
    type = "file"
    url = "https://raw.githubusercontent.com/junegunn/fzf-git.sh/main/fzf-git.sh"
    refreshPeriod = "{{ $refreshPeriod }}"
[".local/scripts/fzf-tmux.bash"]
    type = "file"
    url = "https://raw.githubusercontent.com/junegunn/fzf/master/bin/fzf-tmux"
    refreshPeriod = "{{ $refreshPeriod }}"
[".local/share/delta/themes.gitconfig"]
    type = "file"
    url = "https://raw.githubusercontent.com/dandavison/delta/master/themes.gitconfig"
    refreshPeriod = "{{ $refreshPeriod }}"
[".local/share/zsh/site-functions/fzf.zsh"]
    type = "file"
    url = "https://raw.githubusercontent.com/junegunn/fzf/master/shell/completion.zsh"
    refreshPeriod = "{{ $refreshPeriod }}"
[".local/share/zsh/site-functions/fzf-key-bindings.zsh"]
    type = "file"
    url = "https://raw.githubusercontent.com/junegunn/fzf/master/shell/key-bindings.zsh"
    refreshPeriod = "{{ $refreshPeriod }}"
[".config/vim/autoload/plug.vim"]
    type = "file"
    url = "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"
    refreshPeriod = "{{ $refreshPeriod }}"

### ASDF
[".local/share/asdf"]
    type = "git-repo"
    url = "https://github.com/asdf-vm/asdf.git"
    refreshPeriod = "{{ $refreshPeriod }}"
    clone.args = ["--depth", "1"]
    pull.args = ["--ff-only"]

### Git Template
[".config/git/template/_/husky.sh"]
    type = "file"
    url = "https://github.com/typicode/husky/raw/main/husky.sh"
    refreshPeriod = "{{ $refreshPeriod }}"

### GPG
[".gnupg/gpg.conf"]
    type = "file"
    url = "https://raw.githubusercontent.com/drduh/config/master/gpg.conf"
    refreshPeriod = "{{ $refreshPeriod }}"

### Taskfiles
[".local/src/shared-common"]
    type = "git-repo"
    url = "https://gitlab.com/megabyte-labs/common/shared.git"
    clone.args = ["--depth", "1"]
    pull.args = ["--ff-only"]

### CookieCutter Template
[".local/src/cookiecutter"]
    type = "git-repo"
    url = "https://gitlab.com/megabyte-labs/templates/cookiecutter.git"
    clone.args = ["--depth", "1"]
    pull.args = ["--ff-only"]

### Git Fuzzy
[".local/src/git-fuzzy"]
    type = "git-repo"
    url = "https://github.com/bigH/git-fuzzy.git"
    refreshPeriod = "{{ $refreshPeriod }}"
    clone.args = ["--depth", "1"]
    pull.args = ["--ff-only"]

### Ansible Roles / Playbook
[".local/src/gas-station"]
    type = "git-repo"
    url = "https://gitlab.com/megabyte-labs/gas-station.git"
    clone.args = ["--depth", "1"]
    pull.args = ["--ff-only"]
[".local/src/ansible-qubes"]
    type = "git-repo"
    url = "https://github.com/ProfessorManhattan/ansible-qubes.git"
    refreshPeriod = "{{ $refreshPeriod }}"
    clone.args = ["--depth", "1"]
    pull.args = ["--ff-only"]
[".local/share/ansible/plugins/callback/beautiful_output.py"]
    type = "file"
    url = "https://github.com/Townk/ansible-beautiful-output/raw/master/callback_plugins/beautiful_output.py"
    refreshPeriod = "{{ $refreshPeriod }}"
[".local/share/ansible/plugins/lookup/bitwarden.py"]
    type = "file"
    url = "https://github.com/ProfessorManhattan/ansible-modules-bitwarden/raw/master/lookup_plugins/bitwarden.py"
    refreshPeriod = "{{ $refreshPeriod }}"

### Packer
[".local/src/packer/archlinux"]
    type = "git-repo"
    url = "https://gitlab.com/megabyte-labs/packer/archlinux-desktop.git"
    clone.args = ["--depth", "1"]
    pull.args = ["--ff-only"]
[".local/src/packer/centos"]
    type = "git-repo"
    url = "https://gitlab.com/megabyte-labs/packer/centos-desktop.git"
    clone.args = ["--depth", "1"]
    pull.args = ["--ff-only"]
[".local/src/packer/debian"]
    type = "git-repo"
    url = "https://gitlab.com/megabyte-labs/packer/debian-desktop.git"
    clone.args = ["--depth", "1"]
    pull.args = ["--ff-only"]
[".local/src/packer/fedora"]
    type = "git-repo"
    url = "https://gitlab.com/megabyte-labs/packer/fedora-desktop.git"
    clone.args = ["--depth", "1"]
    pull.args = ["--ff-only"]
[".local/src/packer/macos"]
    type = "git-repo"
    url = "https://gitlab.com/megabyte-labs/packer/macos-desktop.git"
    clone.args = ["--depth", "1"]
    pull.args = ["--ff-only"]
[".local/src/packer/ubuntu"]
    type = "git-repo"
    url = "https://gitlab.com/megabyte-labs/packer/ubuntu-desktop.git"
    clone.args = ["--depth", "1"]
    pull.args = ["--ff-only"]
[".local/src/packer/windows"]
    type = "git-repo"
    url = "https://gitlab.com/megabyte-labs/packer/windows-desktop.git"
    clone.args = ["--depth", "1"]
    pull.args = ["--ff-only"]

### JumpUSB
[".local/src/jumpusb"]
    type = "git-repo"
    url = "https://gitlab.com/megabyte-labs/jumpusb.git"
    clone.args = ["--depth", "1"]
    pull.args = ["--ff-only"]

{{- if and (not .host.headless) (ne .chezmoi.os "windows") }}
### Neovim
[".config/nvim"]
    type = "git-repo"
    url = "https://github.com/NvChad/NvChad.git"
    refreshPeriod = "{{ $refreshPeriod }}"
    clone.args = ["--depth", "1"]
    pull.args = ["--ff-only"]
{{- end }}

{{- if and (eq .chezmoi.os "linux") (not .host.headless) }}
### Rofi
[".local/share/fonts/GrapeNuts-Regular.ttf"]
    type = "file"
    url = "https://github.com/adi1090x/rofi/raw/master/fonts/GrapeNuts-Regular.ttf"
    refreshPeriod = "{{ $refreshPeriod }}"
[".local/share/fonts/Icomoon-Feather.ttf"]
    type = "file"
    url = "https://github.com/adi1090x/rofi/raw/master/fonts/Icomoon-Feather.ttf"
    refreshPeriod = "{{ $refreshPeriod }}"
[".local/share/fonts/Iosevka-Nerd-Font-Complete.ttf"]
    type = "file"
    url = "https://github.com/adi1090x/rofi/raw/master/fonts/Iosevka-Nerd-Font-Complete.ttf"
    refreshPeriod = "{{ $refreshPeriod }}"
[".local/share/fonts/JetBrains-Mono-Nerd-Font-Complete.ttf"]
    type = "file"
    url = "https://github.com/adi1090x/rofi/raw/master/fonts/JetBrains-Mono-Nerd-Font-Complete.ttf"
    refreshPeriod = "{{ $refreshPeriod }}"
[".config/rofi"]
    type = "archive"
    url = "https://github.com/adi1090x/rofi/archive/refs/heads/master.tar.gz"
    exact = true
    stripComponents = 2
    refreshPeriod = "{{ $refreshPeriod }}"
    include = ["applets/**", "colors/**", "images/**", "launchers/**", "powermenu/**", "scripts/**", "config.rasi"]
{{- end }}

{{- if not .host.headless }}
### Hack Nerd Font Download
{{-   $refreshPeriod := "4800h" }}
{{-   $fontDir := "" }}
{{-   $fontUrlBase := "https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/Hack"}}
{{-   if eq .host.distro.family "darwin" }}
{{-     $fontDir = "Library/Fonts" }}
{{-   else if eq .host.distro.family "linux" }}
{{-     $fontDir = ".local/share/fonts" }}
{{-   else if eq .host.distro.family "windows" }}
{{-     $fontDir = "Windows/Fonts" }}
{{-   end }}
["{{ $fontDir }}/Hack-Regular-Nerd-Font.ttf"]
    type = "file"
    url = "{{ $fontUrlBase }}/Regular/complete/Hack%20Regular%20Nerd%20Font%20Complete{{if eq .host.distro.family "windows"}}%20Windows%20Compatible{{end}}.ttf"
    refreshPeriod = "{{ $refreshPeriod }}"
["{{ $fontDir }}/Hack-Bold-Nerd-Font.ttf"]
    type = "file"
    url = "{{ $fontUrlBase }}/Bold/complete/Hack%20Bold%20Nerd%20Font%20Complete{{if eq .host.distro.family "windows"}}%20Windows%20Compatible{{end}}.ttf"
    refreshPeriod = "{{ $refreshPeriod }}"
["{{ $fontDir }}/Hack-Italic-Nerd-Font.ttf"]
    type = "file"
    url = "{{ $fontUrlBase }}/Italic/complete/Hack%20Italic%20Nerd%20Font%20Complete{{if eq .host.distro.family "windows"}}%20Windows%20Compatible{{end}}.ttf"
    refreshPeriod = "{{ $refreshPeriod }}"
["{{ $fontDir }}/Hack-Bold-Italic-Nerd-Font.ttf"]
    type = "file"
    url = "{{ $fontUrlBase }}/BoldItalic/complete/Hack%20Bold%20Italic%20Nerd%20Font%20Complete{{if eq .host.distro.family "windows"}}%20Windows%20Compatible{{end}}.ttf"
    refreshPeriod = "{{ $refreshPeriod }}"

### Montserrat Font Download
{{-   $fontUrlBase := "https://github.com/JulietaUla/Montserrat/raw/master/fonts/ttf/Montserrat-"}}
{{-   $fonts := list "Black" "BlackItalic" "Bold" "BoldItalic" "ExtraBold" "ExtraBoldItalic" "ExtraLight" "ExtraLightItalic" "Italic" "Light" "LightItalic" "Medium" "MediumItalic" "Regular" "SemiBold" "SemiBoldItalic" "Thin" "ThinItalic" }}
{{-   range $font := $fonts }}
["{{ $fontDir }}/Montserrat-{{ $font }}.ttf"]
    type = "file"
    url = "{{ $fontUrlBase }}{{ $font }}.ttf"
    refreshPeriod = "{{ $refreshPeriod }}"
{{-   end }}

### ZillaSlab Font Download
{{-   $fontUrlBase := "https://github.com/typotheque/zilla-slab/raw/master/fonts_TTF/ZillaSlab"}}
{{-   $fonts := list "-Bold" "-BoldItalic" "-Italic" "-Light" "-LightItalic" "-Medium" "-MediumItalic" "-Regular" "-SemiBold" "-SemiBoldItalic" "Highlight-Bold" "Highlight-Regular" }}
{{-   range $font := $fonts }}
["{{ $fontDir }}/ZillaSlab{{ $font }}.ttf"]
    type = "file"
    url = "{{ $fontUrlBase }}{{ $font }}.ttf"
    refreshPeriod = "{{ $refreshPeriod }}"
{{-   end }}

### Miscellaneous Fonts Download
["{{ $fontDir }}/FontAwesome.ttf"]
    type = "file"
    # Source URL
    url = "https://github.com/VermiumSifell/dotfiles/raw/main/dot_local/share/fonts/fontawesome.ttf"
    refreshPeriod = "{{ $refreshPeriod }}"
["{{ $fontDir }}/Weather-Icons.ttf"]
    type = "file"
    # Source URL
    url = "https://github.com/VermiumSifell/dotfiles/raw/main/dot_local/share/fonts/weathericons.ttf"
    refreshPeriod = "{{ $refreshPeriod }}"
{{- end }}
