add java ls
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
# Fedora Sway workstation
|
||||
|
||||
An Ansible playbook for rebuilding the two NixOS workstation hosts as a native
|
||||
Fedora Sway desktop. The NixOS server host (`sta-len-nix`) and its services,
|
||||
WireGuard, firewall, and Netdata configuration are intentionally excluded.
|
||||
|
||||
## Target
|
||||
|
||||
- Native Fedora 44 on x86_64
|
||||
@@ -21,30 +17,9 @@ Install Ansible as the normal desktop user:
|
||||
sudo dnf install -y ansible
|
||||
git clone https://codeberg.org/bartal-lsn/fedora-provisioning.git
|
||||
cd fedora-provisioning
|
||||
ansible-playbook setup.yml --ask-become-pass
|
||||
ansible-playbook setup.yml -K
|
||||
```
|
||||
|
||||
Do not start the playbook with `sudo`. It uses privilege escalation only for
|
||||
system tasks and installs Zen and user configuration into the invoking user's
|
||||
home directory. Log out or reboot after the first run to enter Sway through
|
||||
SDDM and pick up the new group memberships and environment.
|
||||
|
||||
## Configuration ownership
|
||||
|
||||
The Home Manager configuration lives in the public
|
||||
`https://codeberg.org/bartal-lsn/dotfiles` repository as GNU Stow packages.
|
||||
During provisioning, Ansible clones or updates that repository at
|
||||
`~/dotfiles`, then runs `stow -R *` from that directory. Stow therefore
|
||||
restows every package into the user's home directory.
|
||||
|
||||
Commit dotfile changes to the Codeberg repository, then rerun the playbook to
|
||||
pull `~/dotfiles` and refresh its links. Editor-managed binaries such as `zls`,
|
||||
`omnisharp`, `jdtls`, and `lua-language-server` remain Neovim concerns because
|
||||
Fedora does not package them consistently. Ansible installs Fedora's `clangd`
|
||||
and `gopls`, Pyright, TypeScript language server, Black, isort, Prettier, and
|
||||
StyLua. Rust and `rust-analyzer` are installed through the official rustup
|
||||
installer.
|
||||
|
||||
## Desktop keys
|
||||
|
||||
| Key | Action |
|
||||
@@ -69,17 +44,6 @@ The main switches live near the top of `vars.yml`:
|
||||
- `upgrade_system`: upgrade packages before provisioning
|
||||
- `install_virtualization`: install Fedora's libvirt virtualization group
|
||||
- `install_sqlcmd`: retain the Fedora repository's existing SQL Server CLI
|
||||
- `install_typora`: install the unverified Flathub Typora wrapper
|
||||
|
||||
The playbook installs OpenJDK 25 because Fedora 44 does not publish the
|
||||
OpenJDK 21 RPM used by the NixOS setup.
|
||||
|
||||
Fedora does not have a direct equivalent for NixOS's
|
||||
`virtualisation.vmware.host.enable`; this playbook uses Fedora's supported
|
||||
libvirt stack instead. Typora is optional because its Flathub wrapper is not
|
||||
verified by Typora. Zen never uses Flatpak: Ansible downloads the official
|
||||
release archive directly, places it under `~/.tarball-installations/zen`, and
|
||||
creates the `~/.local/bin/zen` launcher.
|
||||
|
||||
## Re-running
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
- ansible.builtin.import_tasks: tasks/system.yml
|
||||
- ansible.builtin.import_tasks: tasks/services.yml
|
||||
- ansible.builtin.import_tasks: tasks/tooling.yml
|
||||
- ansible.builtin.import_tasks: tasks/jdtls.yml
|
||||
- ansible.builtin.import_tasks: tasks/sqlcmd.yml
|
||||
when: install_sqlcmd
|
||||
- ansible.builtin.import_tasks: tasks/zen.yml
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
- name: Check for Eclipse JDT Language Server
|
||||
ansible.builtin.stat:
|
||||
path: "{{ jdtls_install_dir }}/bin/jdtls"
|
||||
become: false
|
||||
register: jdtls_binary
|
||||
|
||||
- name: Create JDT LS installation directories
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
owner: "{{ user_name }}"
|
||||
mode: "0755"
|
||||
become: false
|
||||
loop:
|
||||
- "{{ jdtls_install_dir }}"
|
||||
- "{{ user_home }}/.local/bin"
|
||||
|
||||
- name: Read the JDT LS milestone archive name
|
||||
ansible.builtin.uri:
|
||||
url: "{{ jdtls_base_url }}/latest.txt"
|
||||
return_content: true
|
||||
become: false
|
||||
register: jdtls_latest
|
||||
when: not jdtls_binary.stat.exists
|
||||
|
||||
- name: Download Eclipse JDT Language Server
|
||||
ansible.builtin.get_url:
|
||||
url: "{{ jdtls_base_url }}/{{ jdtls_latest.content | trim }}"
|
||||
dest: "{{ jdtls_archive }}"
|
||||
mode: "0644"
|
||||
checksum: "sha256:{{ jdtls_base_url }}/{{ jdtls_latest.content | trim }}.sha256"
|
||||
become: false
|
||||
when: not jdtls_binary.stat.exists
|
||||
|
||||
- name: Extract Eclipse JDT Language Server
|
||||
ansible.builtin.unarchive:
|
||||
src: "{{ jdtls_archive }}"
|
||||
dest: "{{ jdtls_install_dir }}"
|
||||
remote_src: true
|
||||
creates: "{{ jdtls_install_dir }}/bin/jdtls"
|
||||
become: false
|
||||
when: not jdtls_binary.stat.exists
|
||||
|
||||
- name: Link jdtls into the user's PATH
|
||||
ansible.builtin.file:
|
||||
src: "{{ jdtls_install_dir }}/bin/jdtls"
|
||||
dest: "{{ user_home }}/.local/bin/jdtls"
|
||||
state: link
|
||||
force: true
|
||||
become: false
|
||||
|
||||
- name: Remove downloaded JDT LS archive
|
||||
ansible.builtin.file:
|
||||
path: "{{ jdtls_archive }}"
|
||||
state: absent
|
||||
become: false
|
||||
@@ -4,6 +4,10 @@ user_home: "{{ lookup('env', 'HOME') }}"
|
||||
dotfiles_dir: "{{ user_home }}/dotfiles"
|
||||
dotfiles_repo: https://codeberg.org/bartal-lsn/dotfiles.git
|
||||
dotfiles_ssh_repo: git@codeberg.org:bartal-lsn/dotfiles.git
|
||||
jdtls_version: "1.60.0"
|
||||
jdtls_base_url: "https://download.eclipse.org/jdtls/milestones/{{ jdtls_version }}"
|
||||
jdtls_install_dir: "{{ user_home }}/.local/share/jdtls"
|
||||
jdtls_archive: /tmp/jdtls.tar.gz
|
||||
|
||||
system_timezone: Atlantic/Faroe
|
||||
system_locale: en_US.UTF-8
|
||||
@@ -13,7 +17,6 @@ keyboard_layout: fo
|
||||
upgrade_system: true
|
||||
install_virtualization: true
|
||||
install_sqlcmd: true
|
||||
install_typora: true
|
||||
|
||||
fedora_packages:
|
||||
# Media and documents
|
||||
|
||||
Reference in New Issue
Block a user