mirror of
https://github.com/fscotto/infra.git
synced 2026-09-27 19:03:47 +00:00
feat: manage Java 11 with Mise on Fedora WSL
This commit is contained in:
@@ -84,6 +84,7 @@ The dotfile vars follow the same split: `desktop_common_dotfiles` carries mode-i
|
|||||||
## Workstation Notes
|
## Workstation Notes
|
||||||
- `deadalus` is modeled as Windows + Fedora WSL and is the sole workstation target.
|
- `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 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.
|
- Windows applications are installed manually and are not managed from the WSL profile.
|
||||||
|
|
||||||
## Atlas NAS Notes
|
## Atlas NAS Notes
|
||||||
|
|||||||
@@ -144,6 +144,7 @@ Lo stato attuale del profilo workstation include:
|
|||||||
|
|
||||||
- installazione pacchetti base Fedora via dnf
|
- installazione pacchetti base Fedora via dnf
|
||||||
- installazione e configurazione di Docker dal repository ufficiale
|
- 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
|
- gestione dei dotfiles workstation e rendering dei template dev condivisi
|
||||||
- preparazione di Fedora WSL con `systemd` per il toolchain di sviluppo
|
- preparazione di Fedora WSL con `systemd` per il toolchain di sviluppo
|
||||||
- attivazione del firewall `firewalld` sui target Fedora che dichiarano regole host-specifiche
|
- attivazione del firewall `firewalld` sui target Fedora che dichiarano regole host-specifiche
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ The workstation receives two layers:
|
|||||||
- Fedora development setup through `workstation_dev_fedora`.
|
- Fedora development setup through `workstation_dev_fedora`.
|
||||||
- WSL setup with `systemd` through `workstation_dev_wsl`.
|
- 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
|
### WSL workflow
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,24 @@ enabled_services:
|
|||||||
- docker
|
- docker
|
||||||
|
|
||||||
workstation_dev_wsl_packages:
|
workstation_dev_wsl_packages:
|
||||||
|
- mise
|
||||||
- pinentry-curses
|
- pinentry-curses
|
||||||
- python3-pip
|
- python3-pip
|
||||||
- tmux
|
- 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_is_wsl: true
|
||||||
workstation_wsl_systemd_enabled: true
|
workstation_wsl_systemd_enabled: true
|
||||||
workstation_dev_wsl_dotfiles:
|
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
|
- src: .gnupg/gpg-agent.conf
|
||||||
dest: .gnupg/gpg-agent.conf
|
dest: .gnupg/gpg-agent.conf
|
||||||
mode: "0600"
|
mode: "0600"
|
||||||
|
|||||||
@@ -25,6 +25,20 @@
|
|||||||
- "'workstation_dev_fedora' in group_names"
|
- "'workstation_dev_fedora' in group_names"
|
||||||
- fedora_manage_docker_repo | default(false)
|
- 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
|
- name: Refresh dnf package metadata
|
||||||
tags: [packages]
|
tags: [packages]
|
||||||
ansible.builtin.dnf:
|
ansible.builtin.dnf:
|
||||||
|
|||||||
@@ -55,6 +55,26 @@
|
|||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.dest }}"
|
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
|
- name: Ensure WSL boot configuration file exists
|
||||||
tags: [packages, services]
|
tags: [packages, services]
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
|||||||
4
dotfiles/workstation_dev_wsl/.bashrc.d/30-mise.sh
Normal file
4
dotfiles/workstation_dev_wsl/.bashrc.d/30-mise.sh
Normal 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
|
||||||
2
dotfiles/workstation_dev_wsl/.config/mise/config.toml
Normal file
2
dotfiles/workstation_dev_wsl/.config/mise/config.toml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[tools]
|
||||||
|
java = "temurin-11.0.31+11"
|
||||||
Reference in New Issue
Block a user