Compare commits

...

4 Commits

Author SHA1 Message Date
Fabio Scotto di Santolo
1517c92866 Merge pull request #3 from fscotto/remove-freebsd-profile
Remove FreeBSD profile
2026-08-31 21:39:44 +02:00
Fabio Scotto di Santolo
6296925f2d Remove FreeBSD profile 2026-08-31 21:38:13 +02:00
Fabio Scotto di Santolo
45340103d0 feat: manage Java 11 with Mise on Fedora WSL 2026-08-31 18:20:52 +02:00
Fabio Scotto di Santolo
67b576d9b3 Fix Git config on Fedora WSL 2026-08-31 17:49:48 +02:00
16 changed files with 62 additions and 132 deletions

View File

@@ -1,6 +1,6 @@
# AGENTS.md
Ansible-driven personal infrastructure repo for Fedora and Void desktops, FreeBSD transition targets, WSL, and an Ubuntu server.
Ansible-driven personal infrastructure repo for Fedora and Void desktops, WSL, and an Ubuntu server.
## Source Of Truth
- Main orchestration: `ansible/site.yml`
@@ -84,6 +84,7 @@ The dotfile vars follow the same split: `desktop_common_dotfiles` carries mode-i
## Workstation Notes
- `deadalus` is modeled as Windows + Fedora WSL and is the sole workstation target.
- Fedora WSL belongs to `platform_fedora`, `workstation_dev_fedora`, and the shared WSL layer. It must not receive Flatpak or Snap runtimes.
- Fedora WSL installs Mise from the official `jdxcode/mise` COPR and uses its pinned Temurin Java 11 JDK; update the declared Mise version deliberately.
- Windows applications are installed manually and are not managed from the WSL profile.
## Atlas NAS Notes

View File

@@ -144,6 +144,7 @@ Lo stato attuale del profilo workstation include:
- installazione pacchetti base Fedora via dnf
- installazione e configurazione di Docker dal repository ufficiale
- installazione di Mise dal COPR ufficiale con JDK Eclipse Temurin Java 11 fissato
- gestione dei dotfiles workstation e rendering dei template dev condivisi
- preparazione di Fedora WSL con `systemd` per il toolchain di sviluppo
- attivazione del firewall `firewalld` sui target Fedora che dichiarano regole host-specifiche
@@ -273,13 +274,11 @@ I principali ruoli attualmente presenti sono:
| ------------------------- | ----------------------------------- |
| base | configurazione base comune |
| packages_void | installazione pacchetti su Void |
| packages_freebsd | installazione pacchetti su FreeBSD via pkg |
| packages_ubuntu | installazione pacchetti su Ubuntu |
| packages_fedora | installazione pacchetti su Fedora |
| packages_rocky | installazione pacchetti su Rocky Linux 9 |
| services_runit | gestione servizi runit |
| services_systemd | gestione servizi systemd |
| services_freebsd | gestione servizi FreeBSD dichiarati per host |
| profile_desktop_common | bootstrap desktop Void condiviso |
| profile_desktop_gnome | dotfiles desktop condivisi per Fedora/GNOME |
| profile_desktop_sway | sessione desktop sway / SwayFX (Wayland) |
@@ -303,7 +302,6 @@ Il playbook `ansible/site.yml` e attualmente composto da blocchi per asse:
all -> dotfiles_common
platform_void -> packages_void + services_runit
platform_void & graphical_desktop -> profile_desktop_common + profile_desktop_sway + profile_desktop_niri + profile_desktop_host
platform_freebsd -> packages_freebsd + services_freebsd
platform_fedora -> packages_fedora + services_systemd
platform_rocky -> packages_rocky + services_systemd
atlas -> profile_atlas
@@ -392,7 +390,6 @@ Allo stato attuale questo comando:
- distribuisce i dotfiles comuni a tutti gli host
- per `platform_void` applica pacchetti Void e servizi runit
- per `platform_void + graphical_desktop` applica bootstrap desktop condiviso, sessioni Sway/Niri e override specifici per host
- per `platform_freebsd` non applica nulla finche il gruppo resta senza host
- per `platform_fedora` applica pacchetti Fedora e servizi systemd a `ikaros`, `nymph` e `deadalus`
- per `platform_fedora & role_personal_workstation` applica il layer personale a `ikaros`
- per `platform_fedora & desktop_gnome` applica il profilo GNOME a `ikaros` e `nymph`
@@ -507,10 +504,6 @@ I gruppi legacy `void` e `desktop` sono parent di compatibilita, quindi un host
in `platform_void` e `graphical_desktop` continua a ricevere anche le variabili
Void e desktop esistenti.
Per prove in VM sono disponibili gruppi di esempio in
`ansible/inventory/examples/platform-test-hosts.yml`, da passare esplicitamente
con `-i` insieme all'inventory principale.
Per il flusso mail desktop esiste inoltre uno script dedicato:
```bash

View File

@@ -88,7 +88,7 @@ The workstation receives two layers:
- Fedora development setup through `workstation_dev_fedora`.
- WSL setup with `systemd` through `workstation_dev_wsl`.
That gives it Fedora packages through DNF, Docker from the official repository, shared workstation dotfiles and templates, tmux helpers, and WSL systemd configuration. Windows applications are installed manually; the WSL profile does not manage Python remoting components for them.
That gives it Fedora packages through DNF, Docker from the official repository, Mise from its official COPR repository with a pinned Eclipse Temurin Java 11 JDK, shared workstation dotfiles and templates, tmux helpers, and WSL systemd configuration. Windows applications are installed manually; the WSL profile does not manage Python remoting components for them.
### WSL workflow
@@ -207,13 +207,11 @@ ansible-playbook ansible/site.yml --limit deadalus --tags ai_agents --check --di
| Role | What it does |
| --- | --- |
| `packages_void` | Installs packages on Void. |
| `packages_freebsd` | Installs packages on FreeBSD with pkg. |
| `packages_ubuntu` | Installs packages on Ubuntu. |
| `packages_fedora` | Installs packages on Fedora. |
| `packages_rocky` | Installs packages on Rocky Linux 9. |
| `services_runit` | Manages runit services. |
| `services_systemd` | Manages systemd services. |
| `services_freebsd` | Manages declared FreeBSD rc services. |
| `profile_desktop_common` | Shared Void desktop bootstrap. |
| `profile_desktop_gnome` | Shared Fedora/GNOME desktop dotfiles. |
| `profile_desktop_sway` | Sway / SwayFX Wayland session. |
@@ -232,7 +230,6 @@ ansible-playbook ansible/site.yml --limit deadalus --tags ai_agents --check --di
all -> dotfiles_common
platform_void -> packages_void + services_runit
platform_void & graphical_desktop -> profile_desktop_common + profile_desktop_sway + profile_desktop_niri + profile_desktop_host
platform_freebsd -> packages_freebsd + services_freebsd
platform_fedora -> packages_fedora + services_systemd
platform_rocky -> packages_rocky + services_systemd
atlas -> profile_atlas
@@ -249,7 +246,7 @@ So, in practice:
- `deadalus` gets the Fedora development layer followed by the WSL layer.
- `ubuntu_server` configures `prometheus`.
- `atlas` receives the Rocky platform layer and the NAS profile through SSH.
- Empty `platform_void` and `platform_freebsd` groups do nothing until they get a host.
- Empty `platform_void` groups do nothing until they get a host.
- The playbook never restarts the display manager during a run.
- `secrets/vault.yml` and then `secrets/vault.local.yml` are loaded only when present.

View File

@@ -1,8 +0,0 @@
---
# Optional inventory overlay for VM tests. It is not loaded by ansible.cfg.
all:
children:
platform_freebsd:
hosts:
freebsdtest:
ansible_connection: local

View File

@@ -1,55 +0,0 @@
---
platform_profile: freebsd
platform_family: freebsd
platform_package_manager: pkg
platform_service_manager: rc
ansible_python_interpreter: /usr/local/bin/python3
vim_plugin_distro_packages:
- fzf
vim_plugin_source_plugins:
- name: fzf
repo: https://github.com/junegunn/fzf.git
version: v0.72.0
- name: fzf.vim
repo: https://github.com/junegunn/fzf.vim.git
version: 34a564c81f36047f50e593c1656f4580ff75ccca
- name: vim-fugitive
repo: https://github.com/tpope/vim-fugitive.git
version: 3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0
effective_user_group: "{{ user_group }}"
effective_user_home: "/home/{{ effective_username }}"
user_home: "/home/{{ username }}"
freebsd_packages_base:
- bash
- bash-completion
- bat
- curl
- fzf
- git
- jq
- python3
- ripgrep
- rsync
- tmux
- tree
- unzip
- vim
- wget
- zip
- zoxide
freebsd_development_packages:
- clang
- cmake
- gdb
- go
- gmake
- node
- npm
- pkgconf
- py311-pip
- rust
- shellcheck

View File

@@ -3,12 +3,24 @@ enabled_services:
- docker
workstation_dev_wsl_packages:
- mise
- pinentry-curses
- python3-pip
- tmux
# Java 11 is no longer supplied by the Fedora repositories used by this WSL
# profile. Keep the JDK patch pinned; update this value deliberately.
workstation_mise_java_version: temurin-11.0.31+11
workstation_is_wsl: true
workstation_wsl_systemd_enabled: true
workstation_dev_wsl_dotfiles:
- src: .bashrc.d/30-mise.sh
dest: .bashrc.d/30-mise.sh
mode: "0644"
- src: .config/mise/
dest: .config/mise/
mode: preserve
- src: .gnupg/gpg-agent.conf
dest: .gnupg/gpg-agent.conf
mode: "0600"

View File

@@ -13,9 +13,6 @@ all:
deadalus:
ansible_connection: local
platform_freebsd:
hosts: {}
platform_rocky:
hosts:
atlas:

View File

@@ -25,6 +25,20 @@
- "'workstation_dev_fedora' in group_names"
- fedora_manage_docker_repo | default(false)
- name: Install COPR support on Fedora WSL
tags: [packages, mise]
ansible.builtin.dnf:
name: dnf-plugins-core
state: present
when: "'workstation_dev_wsl' in group_names"
- name: Configure Mise COPR repository on Fedora WSL
tags: [packages, mise]
community.general.copr:
name: jdxcode/mise
state: enabled
when: "'workstation_dev_wsl' in group_names"
- name: Refresh dnf package metadata
tags: [packages]
ansible.builtin.dnf:

View File

@@ -1,14 +0,0 @@
---
- name: Install packages on FreeBSD
tags: [packages]
community.general.pkgng:
name: >-
{{
(
(freebsd_packages_base | default([]))
+ (freebsd_development_packages | default([]))
+ (host_packages | default([]))
)
| unique
}}
state: present

View File

@@ -55,6 +55,26 @@
loop_control:
label: "{{ item.dest }}"
- name: Check whether the pinned Java version is installed with Mise
tags: [packages, mise, java, wsl]
ansible.builtin.command:
cmd: "mise where java@{{ workstation_mise_java_version }}"
become_user: "{{ username }}"
environment:
HOME: "{{ user_home }}"
register: workstation_mise_java_where
changed_when: false
failed_when: false
- name: Install the pinned Java version with Mise
tags: [packages, mise, java, wsl]
ansible.builtin.command:
cmd: mise install
become_user: "{{ username }}"
environment:
HOME: "{{ user_home }}"
when: workstation_mise_java_where.rc != 0
- name: Ensure WSL boot configuration file exists
tags: [packages, services]
ansible.builtin.file:

View File

@@ -1,10 +0,0 @@
---
- name: Enable FreeBSD rc services
tags: [services, packages]
ansible.builtin.service:
name: "{{ item }}"
enabled: true
state: started
loop: "{{ host_enabled_services | default([]) }}"
loop_control:
label: "{{ item }}"

View File

@@ -53,14 +53,6 @@
- profile_desktop_niri
- profile_desktop_host
- name: Configure FreeBSD platform
hosts: platform_freebsd
become: true
roles:
- packages_freebsd
- services_freebsd
- name: Configure Fedora platform
hosts: platform_fedora
become: true

View File

@@ -89,11 +89,11 @@
side-by-side = true
[http "https://gitlab.ecaas.datacenter.comune.roma"]
sslBackend = gnutls
sslBackend = openssl
sslCAInfo = ~/.local/share/certs/ecaas.datacenter.comune.roma.crt
[http "https://gitlab.datacenter.comune.roma"]
sslBackend = gnutls
sslBackend = openssl
sslCAInfo = ~/.local/share/certs/datacenter.comune.roma.crt
[credential]

View File

@@ -1,20 +1,10 @@
# =========================
# Portable Bash config
# Target: Void Linux + FreeBSD
# =========================
# Exit if not interactive
[[ $- != *i* ]] && return
# --- environment detection
case "$(uname -s)" in
Linux) PLATFORM="linux" ;;
FreeBSD) PLATFORM="freebsd" ;;
*) PLATFORM="other" ;;
esac
export PLATFORM
# --- history
HISTSIZE=10000
HISTFILESIZE=20000
@@ -438,15 +428,10 @@ extract() {
}
# =========================
# OS-specific small touches
# Small touches
# =========================
if [ "$PLATFORM" = "freebsd" ]; then
alias df='df -h'
alias du='du -h'
elif [ "$PLATFORM" = "linux" ]; then
alias df='df -h'
alias du='du -h'
fi
alias df='df -h'
alias du='du -h'
[ -r "$HOME/.bashrc.aliases" ] && . "$HOME/.bashrc.aliases"

View File

@@ -0,0 +1,4 @@
# Activate Mise for interactive Bash sessions, including JAVA_HOME for its JDKs.
if command -v mise >/dev/null 2>&1; then
eval "$(mise activate bash)"
fi

View File

@@ -0,0 +1,2 @@
[tools]
java = "temurin-11.0.31+11"