docs: add recipes

This commit is contained in:
2025-01-14 00:06:03 +02:00
parent bdf7e99e38
commit dc58f6dfef
9 changed files with 157 additions and 0 deletions

11
docs/recipes/brew.yml Normal file
View File

@@ -0,0 +1,11 @@
# To use on your manifest:
# - name: brew
# type: manifest
# opts:
# source: git@github.com/chenasraf/sofmani.git
# path: docs/recipes/brew.yml
install:
- name: brew
type: shell
opts:
command: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

20
docs/recipes/direnv.yml Normal file
View File

@@ -0,0 +1,20 @@
# To use on your manifest:
# - name: direnv
# type: manifest
# opts:
# source: git@github.com/chenasraf/sofmani.git
# path: docs/recipes/direnv.yml
install:
- name: direnv
type: group
steps:
- name: direnv
type: brew
platforms:
only: ['macos']
- name: direnv
type: shell
platforms:
only: ['linux']
opts:
command: export bin_path=/usr/local/bin curl -sfL https://direnv.net/install.sh | bash

9
docs/recipes/jq.yml Normal file
View File

@@ -0,0 +1,9 @@
# To use on your manifest:
# - name: jq
# type: manifest
# opts:
# source: git@github.com/chenasraf/sofmani.git
# path: docs/recipes/jq.yml
install:
- name: jq
type: brew

View File

@@ -0,0 +1,27 @@
# To use on your manifest:
# - name: lazydocker
# type: manifest
# opts:
# source: git@github.com/chenasraf/sofmani.git
# path: docs/recipes/lazydocker.yml
install:
- name: lazydocker
type: group
steps:
- name: lazydocker
type: brew
platforms:
only: ['macos']
opts:
tap: jesseduffield/lazydocker
- name: lazydocker
type: shell
platforms:
only: ['linux']
opts:
command: |
cd $(mktemp -d)
VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazydocker/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')
curl -Lo lazydocker.tar.gz "https://github.com/jesseduffield/lazydocker/releases/latest/download/lazydocker_${VERSION}_Linux_x86_64.tar.gz"
tar xf lazydocker.tar.gz lazydocker
sudo install lazydocker /usr/local/bin

31
docs/recipes/lazygit.yml Normal file
View File

@@ -0,0 +1,31 @@
# To use on your manifest:
# - name: lazygit
# type: manifest
# opts:
# source: git@github.com/chenasraf/sofmani.git
# path: docs/recipes/lazygit.yml
install:
- name: lazygit
type: group
steps:
- name: lazygit
type: brew
platforms:
only: ['macos']
opts:
tap: jesseduffield/lazygit
- name: lazygit
type: shell
platforms:
only: ['linux']
check_has_update: |
LATEST=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')
CURRENT=$(lazygit --version | awk -F'[,=]' '{print $6}')
test "$LATEST" != "$CURRENT"
opts:
command: |
cd $(mktemp -d)
VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${VERSION}_Linux_x86_64.tar.gz"
tar xf lazygit.tar.gz lazygit
sudo install lazygit /usr/local/bin

19
docs/recipes/pipx.yml Normal file
View File

@@ -0,0 +1,19 @@
# To use on your manifest:
# - name: pipx
# type: manifest
# opts:
# source: git@github.com/chenasraf/sofmani.git
# path: docs/recipes/pipx.yml
install:
- name: pipx
type: group
post_install: sudo pipx ensurepath --global
steps:
- name: pipx
type: brew
platforms:
only: ['macos']
- name: pipx
type: apt
platforms:
only: ['linux']

View File

@@ -0,0 +1,9 @@
# To use on your manifest:
# - name: prettier
# type: manifest
# opts:
# source: git@github.com/chenasraf/sofmani.git
# path: docs/recipes/prettier.yml
install:
- name: prettier
type: npm

20
docs/recipes/pyenv.yml Normal file
View File

@@ -0,0 +1,20 @@
# To use on your manifest:
# - name: pyenv
# type: manifest
# opts:
# source: git@github.com/chenasraf/sofmani.git
# path: docs/recipes/pyenv.yml
install:
- name: pyenv
type: group
steps:
- name: pyenv
type: brew
platforms:
only: ['macos']
- name: pyenv
type: shell
platforms:
only: ['linux']
opts:
command: 'curl https://pyenv.run | bash'

11
docs/recipes/yq.yml Normal file
View File

@@ -0,0 +1,11 @@
# To use on your manifest:
# - name: yq
# type: manifest
# opts:
# source: git@github.com/chenasraf/sofmani.git
# path: docs/recipes/yq.yml
install:
- name: yq
type: shell
opts:
command: pipx install yq