Squash merge move_to_single_file_pkgs into main
This commit is contained in:
@@ -1,28 +1,235 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
#
|
||||
## Package: nerdfonts
|
||||
## Description: Monospace fonts that are attractive for developers
|
||||
## Version: latest
|
||||
## Methods: archive
|
||||
## Helpers: nerdfont_config, archive
|
||||
---
|
||||
- name: Add nerdfonts
|
||||
- name: Set default nerdfonts facts # {{{
|
||||
ansible.builtin.set_fact:
|
||||
nerdfonts:
|
||||
methods:
|
||||
Linux:
|
||||
- archive
|
||||
Darwin:
|
||||
- system
|
||||
install_path: share/fonts
|
||||
base_url: https://github.com/ryanoasis/nerd-fonts/releases/latest/download
|
||||
install_list: "{{ nerdfonts_install_list | default(['JetBrainsMono', 'FiraCode', 'Symbols']) }}"
|
||||
__nerdfonts: # {{{
|
||||
0xProto:
|
||||
brew: font-0xproto-nerd-font
|
||||
"3270":
|
||||
brew: font-3270-nerd-font
|
||||
Agave:
|
||||
brew: font-agave-nerd-font
|
||||
AnonymicePro:
|
||||
archive: AnonymousPro
|
||||
brew: font-anonymice-nerd-font
|
||||
Arimo:
|
||||
brew: font-arimo-nerd-font
|
||||
AurulentSansM:
|
||||
archive: AurulentSansMono
|
||||
brew: font-aurulent-sans-mono-nerd-font
|
||||
BigBlueTerm:
|
||||
archive: BigBlueTerminal
|
||||
brew: font-bigblue-terminal-nerd-font
|
||||
BitstromWera:
|
||||
archive: BitstreamVeraSansMono
|
||||
brew: font-bitstream-vera-sans-mono-nerd-font
|
||||
BlexMono:
|
||||
archive: IBMPlexMono
|
||||
brew: font-blex-mono-nerd-font
|
||||
CaskaydiaCove:
|
||||
archive: CascadiaCode
|
||||
brew: font-caskaydia-cove-nerd-font
|
||||
CaskaydiaMono:
|
||||
archive: CascadiaMono
|
||||
brew: font-caskaydia-mono-nerd-font
|
||||
CodeNewRoman:
|
||||
brew: font-code-new-roman-nerd-font
|
||||
ComicShannsMono:
|
||||
brew: font-comic-shanns-mono-nerd-font
|
||||
CommitMono:
|
||||
brew: font-commit-mono-nerd-font
|
||||
Cousine:
|
||||
brew: font-cousine-nerd-font
|
||||
D2CodingLigature:
|
||||
archive: D2Coding
|
||||
brew: font-d2coding-nerd-font
|
||||
DaddyTimeMono:
|
||||
brew: font-daddy-time-mono-nerd-font
|
||||
DejaVuSansM:
|
||||
archive: DejaVuSansMono
|
||||
brew: font-dejavu-sans-mono-nerd-font
|
||||
DepartureMono:
|
||||
brew: font-departure-mono-nerd-font
|
||||
DroidSansM:
|
||||
archive: DroidSansMono
|
||||
brew: font-droid-sans-mono-nerd-font
|
||||
EnvyCodeR:
|
||||
brew: font-envy-code-r-nerd-font
|
||||
FantasqueSansM:
|
||||
archive: FantasqueSansMono
|
||||
brew: font-fantasque-sans-mono-nerd-font
|
||||
FiraCode:
|
||||
brew: font-fira-code-nerd-font
|
||||
FiraMono:
|
||||
brew: font-fira-mono-nerd-font
|
||||
GeistMono:
|
||||
brew: font-geist-mono-nerd-font
|
||||
GoMono:
|
||||
archive: Go-Mono
|
||||
brew: font-go-mono-nerd-font
|
||||
GohuFont:
|
||||
archive: Gohu
|
||||
brew: font-gohufont-nerd-font
|
||||
Hack:
|
||||
brew: font-hack-nerd-font
|
||||
Hasklug:
|
||||
archive: Hasklig
|
||||
brew: font-hasklug-nerd-font
|
||||
HeavyData:
|
||||
brew: font-heavy-data-nerd-font
|
||||
Hurmit:
|
||||
archive: Hermit
|
||||
brew: font-hurmit-nerd-font
|
||||
iMWriting:
|
||||
archive: IA-Writer
|
||||
brew: font-im-writing-nerd-font
|
||||
Inconsolata:
|
||||
brew: font-inconsolata-nerd-font
|
||||
InconsolataGo:
|
||||
brew: font-inconsolata-go-nerd-font
|
||||
InconsolataLGC:
|
||||
brew: font-inconsolata-lgc-nerd-font
|
||||
IntoneMono:
|
||||
archive: IntelOneMono
|
||||
brew: font-intone-mono-nerd-font
|
||||
Iosevka:
|
||||
brew: font-iosevka-nerd-font
|
||||
IosevkaTerm:
|
||||
brew: font-iosevka-term-nerd-font
|
||||
IosevkaTermSlab:
|
||||
brew: font-iosevka-term-slab-nerd-font
|
||||
JetBrainsMono:
|
||||
brew: font-jetbrains-mono-nerd-font
|
||||
Lekton:
|
||||
brew: font-lekton-nerd-font
|
||||
LiterationMono:
|
||||
archive: LiberationMono
|
||||
brew: font-liberation-nerd-font
|
||||
Lilex:
|
||||
brew: font-lilex-nerd-font
|
||||
MartianMono:
|
||||
brew: font-martian-mono-nerd-font
|
||||
MesloLG:
|
||||
archive: Meslo
|
||||
brew: font-meslo-lg-nerd-font
|
||||
Monaspice:
|
||||
archive: Monaspace
|
||||
brew: font-monaspace-nerd-font
|
||||
Monofur:
|
||||
brew: font-monofur-nerd-font
|
||||
Monoid:
|
||||
brew: font-monoid-nerd-font
|
||||
Mononoki:
|
||||
brew: font-mononoki-nerd-font
|
||||
M+:
|
||||
archive: MPlus
|
||||
brew: font-m+-nerd-font
|
||||
Noto:
|
||||
brew: font-noto-nerd-font
|
||||
OpenDyslexic:
|
||||
brew: font-open-dyslexic-nerd-font
|
||||
Overpass:
|
||||
brew: font-overpass-nerd-font
|
||||
ProFont:
|
||||
brew: font-profont-nerd-font
|
||||
ProggyClean:
|
||||
brew: font-proggy-clean-tt-nerd-font
|
||||
RecMono:
|
||||
archive: Recursive
|
||||
brew: font-recursive-mono-nerd-font
|
||||
RobotoMono:
|
||||
brew: font-roboto-mono-nerd-font
|
||||
ShureTechMono:
|
||||
archive: ShareTechMono
|
||||
brew: font-shure-tech-mono-nerd-font
|
||||
SauceCodePro:
|
||||
archive: SourceCodePro
|
||||
brew: font-sauce-code-pro-nerd-font
|
||||
SpaceMono:
|
||||
brew: font-space-mono-nerd-font
|
||||
Symbols:
|
||||
archive: NerdFontsSymbolsOnly
|
||||
brew: font-symbols-only-nerd-font
|
||||
Terminess:
|
||||
archive: Terminus
|
||||
brew: font-terminess-ttf-nerd-font
|
||||
Tinos:
|
||||
brew: font-tinos-nerd-font
|
||||
Ubuntu:
|
||||
brew: font-ubuntu-nerd-font
|
||||
UbuntuMono:
|
||||
brew: font-ubuntu-mono-nerd-font
|
||||
UbuntuSans:
|
||||
brew: font-ubuntu-sans-nerd-font
|
||||
VictorMono:
|
||||
brew: font-victor-mono-nerd-font
|
||||
ZedMono:
|
||||
brew: font-zed-mono-nerd-font
|
||||
# }}}
|
||||
base_url: https://github.com/ryanoasis/nerd-fonts/releases/latest/download
|
||||
# }}}
|
||||
- name: Configure nerdfonts
|
||||
when:
|
||||
- nerdfonts_configured is undefined
|
||||
- "'nerdfonts' not in __configured"
|
||||
block:
|
||||
- name: Load nerdfonts config
|
||||
ansible.builtin.include_tasks:
|
||||
file: config/nerdfonts.yml
|
||||
|
||||
- name: Append nerdfonts to pkg_archive
|
||||
- name: Set nerdfonts install method
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
- nerdfonts_imethod is undefined
|
||||
ansible.builtin.set_fact:
|
||||
pkg_archive: "{{ pkg_archive + ['nerdfonts'] }}"
|
||||
nerdfonts_imethod: "{{ imethod if imethod in nerdfonts.methods[system] else nerdfonts.methods[system][0] }}"
|
||||
|
||||
- name: Append nerdfonts to pkg_cask
|
||||
- name: Configure nerdfonts archive install
|
||||
when:
|
||||
- ansible_system == 'Darwin'
|
||||
loop: "{{ nerdfonts.fonts }}"
|
||||
loop_control:
|
||||
loop_var: font
|
||||
- nerdfonts_imethod == 'archive'
|
||||
block:
|
||||
- name: Create nerdfonts directories
|
||||
become: "{{ install_become }}"
|
||||
become_user: "{{ install_become_user }}"
|
||||
ansible.builtin.file:
|
||||
state: directory
|
||||
mode: '0755'
|
||||
path: "{{ install_prefix }}/{{ nerdfonts.install_path }}"
|
||||
owner: "{{ install_prefix_owner }}"
|
||||
group: "{{ install_prefix_group }}"
|
||||
|
||||
- name: Configure nerdfonts archive install
|
||||
when:
|
||||
- nerdfonts_install_list|length > 0
|
||||
loop: "{{ nerdfonts.install_list }}"
|
||||
loop_control:
|
||||
loop_var: nf
|
||||
ansible.builtin.include_tasks: helpers/nerdfont_config.yml
|
||||
|
||||
- name: Configure nerdfonts system install
|
||||
when:
|
||||
- nerdfonts_imethod == 'system'
|
||||
block:
|
||||
- name: Append nerdfonts to pkg_cask
|
||||
loop: "{{ nerdfonts.install_list }}"
|
||||
loop_control:
|
||||
loop_var: nf
|
||||
ansible.builtin.set_fact:
|
||||
pkg_cask: "{{ pkg_cask + [__nerdfonts[nf].brew] }}"
|
||||
|
||||
- name: Finalise nerdfonts archive install
|
||||
ansible.builtin.set_fact:
|
||||
pkg_cask: "{{ pkg_cask + [pkgconfig.nerdfonts.fonts[font].brew] }}"
|
||||
nerdfonts_install: "{{ nerdfonts_imethod }}={{ nerdfont.install_list }}"
|
||||
|
||||
- name: Set nerdfonts_configured
|
||||
ansible.builtin.set_fact:
|
||||
nerdfonts_configured: true
|
||||
__configured: "{{ __configured | combine( { 'nerdfonts': nerdfonts_install } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user