Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
steps:
- uses: actions/checkout@v6.0.1

- name: Set up Python 3.14
- name: Set up Python 3.13
uses: actions/setup-python@v6
with:
python-version: "3.14"
python-version: "3.13"

- name: Install system deps
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit-autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
with:
ref: develop

- name: Set up Python 3.14
- name: Set up Python 3.13
uses: actions/setup-python@v6
with:
python-version: "3.14"
python-version: "3.13"

- name: Install system deps
shell: bash
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
steps:
- uses: actions/checkout@v6.0.1

- name: Set up Python 3.14
- name: Set up Python 3.13
uses: actions/setup-python@v6
with:
python-version: "3.14"
python-version: "3.13"

- name: Install system deps
shell: bash
Expand Down Expand Up @@ -49,10 +49,10 @@ jobs:
steps:
- uses: actions/checkout@v6.0.1

- name: Set up Python 3.14
- name: Set up Python 3.13
uses: actions/setup-python@v6
with:
python-version: "3.14"
python-version: "3.13"

- name: Install system deps
shell: bash
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0


## [Unreleased]
### Added
- MacOS Tools/Packages:
* opencode.
* godot.

### Changed
- Python default versions instaled with pyenv to (`3.11`, `3.12`, `3.13`, `3.14`).
- Updated dev dependencies.
Expand Down
4 changes: 3 additions & 1 deletion default.macos.config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# Homebrew Configuration
# These settings configure the Homebrew package manager and its installations.
homebrew_prefix: "{{ (ansible_machine == 'arm64') | ternary('/opt/homebrew', '/usr/local') }}"
homebrew_prefix: "{{ (ansible_facts['machine'] == 'arm64') | ternary('/opt/homebrew', '/usr/local') }}"
homebrew_install_path: "{{ homebrew_prefix }}/Homebrew"
homebrew_brew_bin_path: "{{ homebrew_prefix }}/bin"
homebrew_brew_sbin_path: "{{ homebrew_prefix }}/sbin"
Expand Down Expand Up @@ -39,6 +39,8 @@ homebrew_installed_packages:
- fish
- starship
- btop
- opencode
- godot

# Homebrew Cask Applications
# Directory for Cask applications and list of applications to install.
Expand Down
11 changes: 7 additions & 4 deletions docs/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Below is a list of the key default variables available in `default.macos.config.
- neovim
- tmux
- chezmoi
- jesseduffield/lazydocker/lazydocker
- lazydocker
- sshpass
- htop
- dust
Expand All @@ -78,6 +78,8 @@ Below is a list of the key default variables available in `default.macos.config.
- fish
- starship
- btop
- opencode
- godot
```

- `homebrew_cask_appdir`: Directory where cask applications will be installed.
Expand Down Expand Up @@ -278,7 +280,7 @@ a `<target-os>.config.yml` file and setting the overrides in that file. e.g.:
- neovim
- tmux
- chezmoi
- "jesseduffield/lazydocker/lazydocker"
- lazydocker
- sshpass
- htop
- dust
Expand All @@ -287,9 +289,10 @@ a `<target-os>.config.yml` file and setting the overrides in that file. e.g.:
- fish
- starship
- btop
- awscli
- tfenv
- opencode
- godot
- ffmpeg
- duckdb

homebrew_cask_apps:
- firefox
Expand Down
6 changes: 3 additions & 3 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@
ansible.builtin.apt:
update_cache: true
cache_valid_time: 3600
when: ansible_os_family == 'Debian'
when: ansible_facts['os_family'] == 'Debian'

- name: Ensure build dependencies are installed (Debian).
ansible.builtin.package:
name:
- openssh-server
- openssh-client
state: present
when: ansible_os_family == 'Debian'
when: ansible_facts['os_family'] == 'Debian'

- name: Ensure auth.log file is present.
ansible.builtin.copy:
dest: /var/log/auth.log
content: ""
force: false
mode: 0644
when: ansible_distribution == 'Debian'
when: ansible_facts['distribution'] == 'Debian'

- name: Import main Playbook
ansible.builtin.import_playbook: ../../playbooks/main.yml
18 changes: 9 additions & 9 deletions playbooks/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- name: Installs Rosetta 2
ansible.builtin.command: /usr/sbin/softwareupdate --install-rosetta --agree-to-license
changed_when: false
when: ansible_distribution == "MacOSX" and ansible_architecture == "arm64"
when: ansible_facts["distribution"] == "MacOSX" and ansible_facts["architecture"] == "arm64"
tags: ['always']

roles:
Expand All @@ -25,48 +25,48 @@
- role: geerlingguy.mac.mas
environment:
# Fix first run path
PATH: "{{ homebrew_brew_bin_path }}:{{ homebrew_brew_sbin_path }}:/usr/local/bin:{{ ansible_env.PATH }}"
PATH: "{{ homebrew_brew_bin_path }}:{{ homebrew_brew_sbin_path }}:/usr/local/bin:{{ ansible_facts['env']['PATH'] }}"
when: (mas_installed_apps | default([]) | length > 0) or
(mas_installed_app_ids | default([]) | length > 0)
tags: ['mas']
- role: geerlingguy.mac.dock
environment:
# Fix first run path
PATH: "{{ homebrew_brew_bin_path }}:{{ homebrew_brew_sbin_path }}:/usr/local/bin:{{ ansible_env.PATH }}"
PATH: "{{ homebrew_brew_bin_path }}:{{ homebrew_brew_sbin_path }}:/usr/local/bin:{{ ansible_facts['env']['PATH'] }}"
when: configure_dock
tags: ['dock']
- role: fedejaure.dev_setup.oh_my_zsh
environment:
# Fix first run path
PATH: "{{ homebrew_brew_bin_path }}:{{ homebrew_brew_sbin_path }}:/usr/local/bin:{{ ansible_env.PATH }}"
PATH: "{{ homebrew_brew_bin_path }}:{{ homebrew_brew_sbin_path }}:/usr/local/bin:{{ ansible_facts['env']['PATH'] }}"
tags: ['oh-my-zsh']
- role: fedejaure.dev_setup.pyenv
environment:
# Fix first run path
PATH: "{{ homebrew_brew_bin_path }}:{{ homebrew_brew_sbin_path }}:/usr/local/bin:{{ ansible_env.PATH }}"
PATH: "{{ homebrew_brew_bin_path }}:{{ homebrew_brew_sbin_path }}:/usr/local/bin:{{ ansible_facts['env']['PATH'] }}"
tags: ['pyenv']

tasks:
- name: Configure Homebrew bin rc PATH
ansible.builtin.lineinfile:
path: "{{ ansible_env.HOME }}/.zshrc"
path: "{{ ansible_facts['env']['HOME'] }}/.zshrc"
line: 'export PATH="{{ homebrew_brew_bin_path }}:$PATH"'
insertbefore: "^# BEGIN PYENV"
tags: ['homebrew']
when: configure_homebrew_bin_rc_path

- name: Configure Homebrew sbin rc PATH
ansible.builtin.lineinfile:
path: "{{ ansible_env.HOME }}/.zshrc"
path: "{{ ansible_facts['env']['HOME'] }}/.zshrc"
line: 'export PATH="{{ homebrew_brew_sbin_path }}:$PATH"'
insertbefore: "^# BEGIN PYENV"
tags: ['homebrew']
when: configure_homebrew_sbin_rc_path

- name: Configure pipx bin rc PATH
ansible.builtin.lineinfile:
path: "{{ ansible_env.HOME }}/.zshrc"
line: 'export PATH="$PATH:{{ ansible_env.HOME }}/.local/bin"'
path: "{{ ansible_facts['env']['HOME'] }}/.zshrc"
line: "export PATH=\"$PATH:{{ ansible_facts['env']['HOME'] }}/.local/bin\""
insertbefore: "^# BEGIN PYENV"
tags: ['pipx']
when: configure_pipx_bin_rc_path
Expand Down
9 changes: 5 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package-mode = false
"Bug Tracker" = "https://github.com/fedejaure/dev-setup/issues"

[tool.poetry.dependencies]
python = "<3.15,>=3.14"
python = "<3.14,>=3.13"
ansible = "^13.1.0"

[tool.poetry.group.dev.dependencies]
Expand Down Expand Up @@ -69,7 +69,7 @@ select = [
"ISC", # flake8-implicit-str-concat
"RUF", # Ruff-specific rules
]
ignore = ["ANN101", "D203", "D213"]
ignore = ["D203", "D213"]
unfixable = [
"ERA", # Don't remove commented-out code
]
Expand Down
2 changes: 1 addition & 1 deletion roles/oh_my_zsh/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
oh_my_zsh_root: "{{ ansible_env.HOME }}/.oh-my-zsh"
oh_my_zsh_root: "{{ ansible_facts['env']['HOME'] }}/.oh-my-zsh"
4 changes: 2 additions & 2 deletions roles/oh_my_zsh/tasks/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
with_first_found:
- files:
- macos.yml
when: ansible_distribution == "MacOSX"
when: ansible_facts['distribution'] == "MacOSX"

- name: Ensure Oh My Zsh required homebrew packages are installed.
community.general.homebrew:
name: "{{ item.name | default(item) }}"
install_options: "{{ item.install_options | default(omit) }}"
loop: "{{ __oh_my_zsh_homebrew_required_packages }}"
when: ansible_distribution == "MacOSX"
when: ansible_facts['distribution'] == "MacOSX"
2 changes: 1 addition & 1 deletion roles/oh_my_zsh/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Setup on macOS
ansible.builtin.include_tasks: macos.yml
when: "ansible_os_family == 'Darwin'"
when: "ansible_facts['os_family'] == 'Darwin'"

- name: Check if ~/.oh-my-zsh already exists
ansible.builtin.stat:
Expand Down
2 changes: 1 addition & 1 deletion roles/pyenv/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
pyenv_root: "{{ ansible_env.HOME }}/.pyenv"
pyenv_root: "{{ ansible_facts['env']['HOME'] }}/.pyenv"

pyenv_python_versions:
- 3.11.14
Expand Down
4 changes: 2 additions & 2 deletions roles/pyenv/tasks/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
with_first_found:
- files:
- macos.yml
when: ansible_distribution == "MacOSX"
when: ansible_facts['distribution'] == "MacOSX"

- name: Ensure pyenv required homebrew packages are installed.
community.general.homebrew:
name: "{{ item.name | default(item) }}"
install_options: "{{ item.install_options | default(omit) }}"
loop: "{{ __pyenv_homebrew_required_packages }}"
when: ansible_distribution == "MacOSX"
when: ansible_facts['distribution'] == "MacOSX"
2 changes: 1 addition & 1 deletion roles/pyenv/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Setup on macOS
ansible.builtin.include_tasks: macos.yml
when: "ansible_os_family == 'Darwin'"
when: "ansible_facts['os_family'] == 'Darwin'"

- name: Check if ~/.pyenv already exists
ansible.builtin.stat:
Expand Down
4 changes: 2 additions & 2 deletions roles/pyenv/templates/.pyenvrc.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export PYENV_ROOT="{{ pyenv_root }}"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"
eval "$(pyenv init --path $SHELL)"
eval "$(pyenv virtualenv-init - $SHELL)"
2 changes: 1 addition & 1 deletion roles/pyenv/vars/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ __pyenv_homebrew_required_packages:
- zlib
- tcl-tk

__pyenv_rc_path: "{{ ansible_env.HOME }}/.zshrc"
__pyenv_rc_path: "{{ ansible_facts['env']['HOME'] }}/.zshrc"