Compare commits

..
16 Commits
13 changed files with 227 additions and 156 deletions
+5 -5
View File
@@ -6,7 +6,7 @@
- Sway with SDDM, Waybar, PipeWire, printing, SSH, and NetworkManager - Sway with SDDM, Waybar, PipeWire, printing, SSH, and NetworkManager
- Faroese keyboard layout, Danish regional formats, and Atlantic/Faroe time - Faroese keyboard layout, Danish regional formats, and Atlantic/Faroe time
- Foot as the terminal, opening the persistent `tmux` session - Foot as the terminal, opening the persistent `tmux` session
- Zen as the default browser, installed from Zen's official release tarball - Brave Origin as the default browser
- Development tools, formatters, and Fedora-packaged language servers from NixOS - Development tools, formatters, and Fedora-packaged language servers from NixOS
## Run ## Run
@@ -15,7 +15,7 @@ Install Ansible as the normal desktop user:
```bash ```bash
sudo dnf install -y ansible sudo dnf install -y ansible
git clone https://codeberg.org/bartal-lsn/fedora-provisioning.git git clone https://git.public.xn--fl-6ja.fo/bl/fedora-provisioning.git
cd fedora-provisioning cd fedora-provisioning
ansible-playbook setup.yml -K ansible-playbook setup.yml -K
``` ```
@@ -25,7 +25,7 @@ ansible-playbook setup.yml -K
| Key | Action | | Key | Action |
|---|---| |---|---|
| `Super+t` | Foot attached to tmux session `main` | | `Super+t` | Foot attached to tmux session `main` |
| `Super+b` | Zen Browser | | `Super+b` | Brave-Origin Browser |
| `Super+d` | Rofi application launcher | | `Super+d` | Rofi application launcher |
| `Super+q` | Close window | | `Super+q` | Close window |
| `Super+h/j/k/l` | Move focus | | `Super+h/j/k/l` | Move focus |
@@ -48,6 +48,6 @@ The main switches live near the top of `vars.yml`:
## Re-running ## Re-running
The playbook is designed to be repeatable. Zen, Bun, Rust, Starship, npm tools, The playbook is designed to be repeatable. Brave Origin, Rust, Starship, npm tools,
services, and configuration files are checked before changes are made. Zen services, and configuration files are checked before changes are made. Brave Origin
handles browser updates itself after the initial binary installation. handles browser updates itself after the initial binary installation.
+3 -1
View File
@@ -31,7 +31,8 @@
when: install_jdtls when: install_jdtls
- ansible.builtin.import_tasks: tasks/sqlcmd.yml - ansible.builtin.import_tasks: tasks/sqlcmd.yml
when: install_sqlcmd when: install_sqlcmd
- ansible.builtin.import_tasks: tasks/zen.yml - ansible.builtin.import_tasks: tasks/ghostty.yml
when: install_ghostty
- ansible.builtin.import_tasks: tasks/dotfiles.yml - ansible.builtin.import_tasks: tasks/dotfiles.yml
- ansible.builtin.import_tasks: tasks/user_config.yml - ansible.builtin.import_tasks: tasks/user_config.yml
- ansible.builtin.import_tasks: tasks/pcloud.yml - ansible.builtin.import_tasks: tasks/pcloud.yml
@@ -40,3 +41,4 @@
when: install_typora when: install_typora
- ansible.builtin.import_tasks: tasks/duckdb.yml - ansible.builtin.import_tasks: tasks/duckdb.yml
when: install_duckdb when: install_duckdb
- ansible.builtin.import_tasks: tasks/rpm.yml
+1 -1
View File
@@ -27,7 +27,7 @@
- remote - remote
- set-url - set-url
- origin - origin
- "{{ dotfiles_ssh_repo }}" - "{{ dotfiles_repo }}"
become: false become: false
changed_when: false changed_when: false
+9 -1
View File
@@ -1,16 +1,22 @@
--- - name: Stat DuckDB CLI installation
ansible.builtin.stat:
path: /usr/local/bin/duckdb
register: duckdb_installed_result
- name: Download DuckDB CLI - name: Download DuckDB CLI
ansible.builtin.get_url: ansible.builtin.get_url:
url: "https://install.duckdb.org/v{{ duckdb_version }}/duckdb_cli-linux-amd64.gz" url: "https://install.duckdb.org/v{{ duckdb_version }}/duckdb_cli-linux-amd64.gz"
dest: /tmp/duckdb_cli-linux-amd64.gz dest: /tmp/duckdb_cli-linux-amd64.gz
mode: "0644" mode: "0644"
timeout: 300 timeout: 300
when: not duckdb_installed_result.stat.exists
- name: Install DuckDB CLI - name: Install DuckDB CLI
ansible.builtin.shell: gzip -dc /tmp/duckdb_cli-linux-amd64.gz > /usr/local/bin/duckdb ansible.builtin.shell: gzip -dc /tmp/duckdb_cli-linux-amd64.gz > /usr/local/bin/duckdb
args: args:
executable: /bin/bash executable: /bin/bash
creates: /usr/local/bin/duckdb creates: /usr/local/bin/duckdb
when: not duckdb_installed_result.stat.exists
- name: Make DuckDB executable - name: Make DuckDB executable
ansible.builtin.file: ansible.builtin.file:
@@ -18,8 +24,10 @@
mode: "0755" mode: "0755"
owner: root owner: root
group: root group: root
when: not duckdb_installed_result.stat.exists
- name: Remove DuckDB archive - name: Remove DuckDB archive
ansible.builtin.file: ansible.builtin.file:
path: /tmp/duckdb_cli-linux-amd64.gz path: /tmp/duckdb_cli-linux-amd64.gz
state: absent state: absent
when: not duckdb_installed_result.stat.exists
+48
View File
@@ -0,0 +1,48 @@
---
- name: Stat Ghostty installation
ansible.builtin.stat:
path: /opt/ghostty/Ghostty.AppImage
register: ghostty_installed_result
- name: Create Ghostty install directory
ansible.builtin.file:
path: /opt/ghostty
state: directory
owner: root
group: root
mode: "0755"
when: not ghostty_installed_result.stat.exists
- name: Download Ghostty AppImage
ansible.builtin.get_url:
url: "https://github.com/pkgforge-dev/ghostty-appimage/releases/download/v{{ ghostty_version }}/Ghostty-{{ ghostty_version }}-{{ ghostty_arch }}.AppImage"
dest: /opt/ghostty/Ghostty.AppImage
mode: "0755"
timeout: 300
when: not ghostty_installed_result.stat.exists
- name: Link Ghostty onto system PATH
ansible.builtin.file:
src: /opt/ghostty/Ghostty.AppImage
dest: /usr/local/bin/ghostty
state: link
force: true
- name: Ensure system desktop application directory exists
ansible.builtin.file:
path: /usr/local/share/applications
state: directory
mode: "0755"
- name: Create Ghostty desktop launcher
ansible.builtin.copy:
dest: /usr/local/share/applications/ghostty.desktop
mode: "0644"
content: |
[Desktop Entry]
Type=Application
Name=Ghostty
Comment=Ghostty terminal emulator
Exec=/usr/local/bin/ghostty
Terminal=false
Categories=System;TerminalEmulator;
+98
View File
@@ -0,0 +1,98 @@
- name: Stat Proton Pass installation
ansible.builtin.command: rpm -qa proton-pass
register: proton_pass_installed_result
changed_when: false
failed_when: false
- name: Download Proton Pass
ansible.builtin.get_url:
url: "https://proton.me/download/pass/linux/proton-pass-{{ proton_pass_version }}.x86_64.rpm"
dest: "/tmp/proton-pass-{{ proton_pass_version }}.x86_64.rpm"
mode: "0644"
timeout: 300
when: >
proton_pass_installed_result.stdout == '' or
'proton-pass' not in proton_pass_installed_result.stdout
- name: Install Proton Pass
ansible.builtin.dnf:
name: "/tmp/proton-pass-{{ proton_pass_version }}.x86_64.rpm"
state: present
disable_gpg_check: yes
when: >
proton_pass_installed_result.stdout == '' or
'proton-pass' not in proton_pass_installed_result.stdout
- name: Stat Proton Authenticator installation
ansible.builtin.command: rpm -qa proton-authenticator
register: proton_authenticator_installed_result
changed_when: false
failed_when: false
- name: Download Proton Authenticator
ansible.builtin.get_url:
url: "https://proton.me/download/authenticator/linux/ProtonAuthenticator-{{ proton_authenticator_version }}.x86_64.rpm"
dest: "/tmp/proton-authenticator-{{ proton_authenticator_version }}.x86_64.rpm"
mode: "0644"
timeout: 300
when: >
proton_authenticator_installed_result.stdout == '' or
'proton-authenticator' not in proton_authenticator_installed_result.stdout
- name: Install Proton Authenticator
ansible.builtin.dnf:
name: "/tmp/proton-authenticator-{{ proton_authenticator_version }}.x86_64.rpm"
state: present
disable_gpg_check: yes
when: >
proton_authenticator_installed_result.stdout == '' or
'proton-authenticator' not in proton_authenticator_installed_result.stdout
- name: Stat Proton Mail installation
ansible.builtin.command: rpm -qa proton-mail
register: proton_mail_installed_result
changed_when: false
failed_when: false
- name: Download Proton Mail
ansible.builtin.get_url:
url: "https://proton.me/download/mail/linux/{{ proton_mail_version }}.rpm"
dest: "/tmp/proton-mail.rpm"
mode: "0644"
timeout: 300
when: >
proton_mail_installed_result.stdout == '' or
'proton-mail' not in proton_mail_installed_result.stdout
- name: Install Proton mail
ansible.builtin.dnf:
name: "/tmp/proton-mail.rpm"
state: present
disable_gpg_check: yes
when: >
proton_mail_installed_result.stdout == '' or
'proton-mail' not in proton_mail_installed_result.stdout
- name: Delete Proton Pass downloaded RPM
ansible.builtin.file:
path: "/tmp/proton-pass-{{ proton_pass_version }}.x86_64.rpm"
state: absent
when: >
proton_pass_installed_result.stdout == '' or
'proton-pass' not in proton_pass_installed_result.stdout
- name: Delete Proton Authenticator downloaded RPM
ansible.builtin.file:
path: "/tmp/proton-authenticator-{{ proton_authenticator_version }}.x86_64.rpm"
state: absent
when: >
proton_authenticator_installed_result.stdout == '' or
'proton-authenticator' not in proton_authenticator_installed_result.stdout
- name: Delete Proton Mail downloaded RPM
ansible.builtin.file:
path: "/tmp/proton-mail.rpm"
state: absent
when: >
proton_mail_installed_result.stdout == '' or
'proton-mail' not in proton_mail_installed_result.stdout
+1 -2
View File
@@ -68,11 +68,10 @@
content: | content: |
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export GOPATH="${GOPATH:-$HOME/go}" export GOPATH="${GOPATH:-$HOME/go}"
export PATH="$HOME/.scripts:$HOME/.local/bin:$HOME/.cargo/bin:$HOME/.bun/bin:$HOME/bin/zig:$HOME/bin/zls:$GOPATH/bin:$PATH" export PATH="$HOME/.scripts:$HOME/.local/bin:$HOME/.cargo/bin:$HOME/bin/zig:$HOME/bin/zls:$GOPATH/bin:$PATH"
export EDITOR=nvim export EDITOR=nvim
export VISUAL=nvim export VISUAL=nvim
export TERMINAL=foot export TERMINAL=foot
export BROWSER=zen
export GTK_THEME=Adwaita:dark export GTK_THEME=Adwaita:dark
export MOZ_ENABLE_WAYLAND=1 export MOZ_ENABLE_WAYLAND=1
export ELECTRON_OZONE_PLATFORM_HINT=wayland export ELECTRON_OZONE_PLATFORM_HINT=wayland
+7 -19
View File
@@ -91,24 +91,12 @@
when: not starship_binary.stat.exists when: not starship_binary.stat.exists
- name: Run Starship installer - name: Run Starship installer
ansible.builtin.command: /tmp/install_starship.sh -y ansible.builtin.command: /tmp/install_starship.sh -y --bin-dir "{{ user_home }}/.local/bin"
become: false
when: not starship_binary.stat.exists when: not starship_binary.stat.exists
become: true
- name: Check for Bun - name: Remove the Starship installer
ansible.builtin.stat: ansible.builtin.file:
path: "{{ user_home }}/.bun/bin/bun" path: /tmp/install_starship.sh
become: false state: absent
register: bun_binary when: not starship_binary.stat.exists
- name: Download the Bun installer
ansible.builtin.get_url:
url: https://bun.sh/install
dest: /tmp/bun-install.sh
mode: "0755"
when: not bun_binary.stat.exists
- name: Install Bun for the workstation user
ansible.builtin.command: /tmp/bun-install.sh
become: false
when: not bun_binary.stat.exists
+17 -7
View File
@@ -1,4 +1,8 @@
--- - name: Stat Typora installation directory
ansible.builtin.stat:
path: /opt/typora
register: typora_installed_result
- name: Create Typora install directory - name: Create Typora install directory
ansible.builtin.file: ansible.builtin.file:
path: /opt/typora path: /opt/typora
@@ -6,6 +10,7 @@
owner: root owner: root
group: root group: root
mode: "0755" mode: "0755"
when: not typora_installed_result.stat.exists
- name: Download Typora Linux binary archive - name: Download Typora Linux binary archive
ansible.builtin.get_url: ansible.builtin.get_url:
@@ -13,6 +18,7 @@
dest: "{{ typora_archive }}" dest: "{{ typora_archive }}"
mode: "0644" mode: "0644"
timeout: 300 timeout: 300
when: not typora_installed_result.stat.exists
- name: Extract Typora - name: Extract Typora
ansible.builtin.unarchive: ansible.builtin.unarchive:
@@ -22,6 +28,7 @@
owner: root owner: root
group: root group: root
mode: "0755" mode: "0755"
when: not typora_installed_result.stat.exists
- name: Ensure Typora files are readable - name: Ensure Typora files are readable
ansible.builtin.file: ansible.builtin.file:
@@ -31,6 +38,13 @@
group: root group: root
mode: "0755" mode: "0755"
recurse: true recurse: true
when: not typora_installed_result.stat.exists
- name: Ensure system desktop application directory exists
ansible.builtin.file:
path: /usr/local/share/applications
state: directory
mode: "0755"
- name: Create Typora launcher wrapper - name: Create Typora launcher wrapper
ansible.builtin.copy: ansible.builtin.copy:
@@ -42,12 +56,7 @@
cd /opt/typora/bin/Typora-linux-x64 cd /opt/typora/bin/Typora-linux-x64
exec /opt/typora/bin/Typora-linux-x64/Typora "$@" exec /opt/typora/bin/Typora-linux-x64/Typora "$@"
when: not typora_installed_result.stat.exists
- name: Ensure system desktop application directory exists
ansible.builtin.file:
path: /usr/local/share/applications
state: directory
mode: "0755"
- name: Create Typora desktop launcher - name: Create Typora desktop launcher
ansible.builtin.copy: ansible.builtin.copy:
@@ -62,3 +71,4 @@
Terminal=false Terminal=false
Categories=Office;WordProcessor;TextEditor; Categories=Office;WordProcessor;TextEditor;
MimeType=text/markdown;text/x-markdown; MimeType=text/markdown;text/x-markdown;
when: not typora_installed_result.stat.exists
+17
View File
@@ -70,3 +70,20 @@
content: "{{ git_email }} {{ git_signing_public_key_contents.content | b64decode | trim }}\n" content: "{{ git_email }} {{ git_signing_public_key_contents.content | b64decode | trim }}\n"
become: false become: false
when: git_signing_public_key.stat.exists when: git_signing_public_key.stat.exists
- name: Ensure systemd user environment directory exists
ansible.builtin.file:
path: "{{ user_home }}/.config/environment.d"
state: directory
owner: "{{ user_name }}"
mode: "0755"
become: false
- name: Configure GTK input method for Ghostty dead keys
ansible.builtin.copy:
dest: "{{ user_home }}/.config/environment.d/im.conf"
owner: "{{ user_name }}"
mode: "0644"
content: |
GTK_IM_MODULE=simple
become: false
-112
View File
@@ -1,112 +0,0 @@
---
- name: Check for Zen Browser
ansible.builtin.stat:
path: "{{ zen_install_dir }}/zen"
become: false
register: zen_binary
- name: Create Zen installation directories
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: "{{ user_name }}"
mode: "0755"
become: false
loop:
- "{{ user_home }}/.tarball-installations"
- "{{ user_home }}/.config"
- "{{ user_home }}/.local/bin"
- "{{ user_home }}/.local/share/applications"
- "{{ user_home }}/.local/share/icons/hicolor/128x128/apps"
- name: Download the current Zen release binary
ansible.builtin.get_url:
url: "{{ zen_archive_url }}"
dest: "{{ zen_archive }}"
mode: "0644"
become: false
when: not zen_binary.stat.exists
- name: Extract Zen Browser
ansible.builtin.unarchive:
src: "{{ zen_archive }}"
dest: "{{ user_home }}/.tarball-installations"
remote_src: true
creates: "{{ zen_install_dir }}/zen"
become: false
- name: Link Zen into the user's PATH
ansible.builtin.file:
src: "{{ zen_install_dir }}/zen"
dest: "{{ user_home }}/.local/bin/zen"
state: link
force: true
become: false
- name: Install Zen application icon
ansible.builtin.copy:
src: "{{ zen_install_dir }}/browser/chrome/icons/default/default128.png"
dest: "{{ user_home }}/.local/share/icons/hicolor/128x128/apps/zen.png"
remote_src: true
owner: "{{ user_name }}"
mode: "0644"
become: false
- name: Install Zen desktop entry
ansible.builtin.copy:
dest: "{{ user_home }}/.local/share/applications/{{ zen_desktop_file }}"
owner: "{{ user_name }}"
mode: "0644"
content: |
[Desktop Entry]
Version=1.0
Type=Application
Name=Zen Browser
Comment=Browse the web
Exec=zen %u
Icon=zen
Terminal=false
StartupNotify=true
StartupWMClass=zen
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;application/x-xpinstall;application/pdf;application/json;
Actions=new-window;new-private-window;profile-manager;
[Desktop Action new-window]
Name=New Window
Exec=zen --new-window %u
[Desktop Action new-private-window]
Name=New Private Window
Exec=zen --private-window %u
[Desktop Action profile-manager]
Name=Profile Manager
Exec=zen --ProfileManager
become: false
- name: Remove downloaded Zen archive
ansible.builtin.file:
path: "{{ zen_archive }}"
state: absent
become: false
- name: Query default MIME handlers
ansible.builtin.command: "xdg-mime query default {{ item }}"
become: false
loop:
- text/html
- application/xhtml+xml
- x-scheme-handler/http
- x-scheme-handler/https
register: current_browser_handlers
changed_when: false
failed_when: false
- name: Set Zen as the default browser
ansible.builtin.command: "xdg-mime default {{ zen_desktop_file }} {{ item.item }}"
become: false
loop: "{{ current_browser_handlers.results }}"
loop_control:
label: "{{ item.item }}"
when: item.stdout != zen_desktop_file
+1 -1
View File
@@ -1,7 +1,7 @@
# Sway workstation configuration translated from NixOS behavior. # Sway workstation configuration translated from NixOS behavior.
set $mod Mod4 set $mod Mod4
set $term foot -e tmux new-session -A -s main set $term foot -e tmux new-session -A -s main
set $browser zen set $browser brave-origin
set $menu rofi -show drun set $menu rofi -show drun
font pango:DejaVu Sans Mono 10 font pango:DejaVu Sans Mono 10
+20 -7
View File
@@ -2,8 +2,7 @@
user_name: "{{ lookup('env', 'USER') }}" user_name: "{{ lookup('env', 'USER') }}"
user_home: "{{ lookup('env', 'HOME') }}" user_home: "{{ lookup('env', 'HOME') }}"
dotfiles_dir: "{{ user_home }}/dotfiles" dotfiles_dir: "{{ user_home }}/dotfiles"
dotfiles_repo: https://codeberg.org/bartal-lsn/dotfiles.git dotfiles_repo: ssh://git@git.flo.fo:2222/FLO/dotfiles.git
dotfiles_ssh_repo: git@codeberg.org:bartal-lsn/dotfiles.git
jdtls_url: https://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz jdtls_url: https://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz
jdtls_install_dir: "{{ user_home }}/.local/share/jdtls" jdtls_install_dir: "{{ user_home }}/.local/share/jdtls"
jdtls_bin_dir: "{{ user_home }}/.local/bin" jdtls_bin_dir: "{{ user_home }}/.local/bin"
@@ -14,6 +13,9 @@ jdtls_download_retries: 3
jdtls_download_delay: 10 jdtls_download_delay: 10
install_duckdb: true install_duckdb: true
duckdb_version: "1.5.2" duckdb_version: "1.5.2"
proton_mail_version: "1.13.4/ProtonMail-desktop-beta"
proton_pass_version: "1.37.0-1"
proton_authenticator_version: "1.1.6-1"
system_timezone: Atlantic/Faroe system_timezone: Atlantic/Faroe
system_locale: en_US.UTF-8 system_locale: en_US.UTF-8
@@ -29,10 +31,14 @@ pcloud_appimage_url: "https://plon1.pcloud.com/cBZeyCak57Ztkt7yq7ZZZ8t965kZ2ZZec
install_typora: true install_typora: true
typora_archive_url: https://downloads.typora.io/linux/Typora-linux-x64.tar.gz typora_archive_url: https://downloads.typora.io/linux/Typora-linux-x64.tar.gz
typora_archive: /tmp/Typora-linux-x64.tar.gz typora_archive: /tmp/Typora-linux-x64.tar.gz
install_ghostty: true
ghostty_version: "1.3.1"
ghostty_arch: x86_64
fedora_packages: fedora_packages:
# Media and documents # Media and documents
- ffmpeg - ffmpeg
- ImageMagick
- fuse - fuse
- fuse-libs - fuse-libs
- ghostscript - ghostscript
@@ -40,10 +46,22 @@ fedora_packages:
- libreoffice - libreoffice
- libtiff - libtiff
- libwebp - libwebp
- libX11-devel
- openjpeg - openjpeg
- tesseract-devel
- leptonica-devel
- jbig2dec-devel
- openjpeg2-devel
- eog
- wf-recorder
- tesseract-langpack-eng
- tesseract-langpack-dan
- tesseract-langpack-isl
- tesseract-langpack-fao
# Development toolchains and libraries # Development toolchains and libraries
- podman - podman
- podman-compose
- binutils - binutils
- clang - clang
- clang-tools-extra - clang-tools-extra
@@ -159,11 +177,6 @@ rustup_components:
- rust-analyzer - rust-analyzer
- rust-src - rust-src
zen_archive_url: https://github.com/zen-browser/desktop/releases/latest/download/zen.linux-x86_64.tar.xz
zen_archive: /tmp/zen.linux-x86_64.tar.xz
zen_install_dir: "{{ user_home }}/.tarball-installations/zen"
zen_desktop_file: zen.desktop
sqlcmd_version: "1.8.1" sqlcmd_version: "1.8.1"
sqlcmd_archive: sqlcmd-linux-amd64.tar.bz2 sqlcmd_archive: sqlcmd-linux-amd64.tar.bz2
sqlcmd_url: "https://github.com/microsoft/go-sqlcmd/releases/download/v{{ sqlcmd_version }}/{{ sqlcmd_archive }}" sqlcmd_url: "https://github.com/microsoft/go-sqlcmd/releases/download/v{{ sqlcmd_version }}/{{ sqlcmd_archive }}"