Compare commits
10
Commits
b8882d98e4
...
7cfdefa3c9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7cfdefa3c9 | ||
|
|
93c9003e9b | ||
|
|
84298aeafc | ||
|
|
384d122d5c | ||
|
|
2fdbb3dc62 | ||
|
|
5092dfc960 | ||
|
|
ceac38afd4 | ||
|
|
07c1679f4a | ||
|
|
4d58d02c2e | ||
|
|
7e13ac8d6b |
@@ -6,7 +6,7 @@
|
||||
- Sway with SDDM, Waybar, PipeWire, printing, SSH, and NetworkManager
|
||||
- Faroese keyboard layout, Danish regional formats, and Atlantic/Faroe time
|
||||
- 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
|
||||
|
||||
## Run
|
||||
@@ -15,7 +15,7 @@ Install Ansible as the normal desktop user:
|
||||
|
||||
```bash
|
||||
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
|
||||
ansible-playbook setup.yml -K
|
||||
```
|
||||
@@ -25,7 +25,7 @@ ansible-playbook setup.yml -K
|
||||
| Key | Action |
|
||||
|---|---|
|
||||
| `Super+t` | Foot attached to tmux session `main` |
|
||||
| `Super+b` | Zen Browser |
|
||||
| `Super+b` | Brave-Origin Browser |
|
||||
| `Super+d` | Rofi application launcher |
|
||||
| `Super+q` | Close window |
|
||||
| `Super+h/j/k/l` | Move focus |
|
||||
@@ -48,6 +48,6 @@ The main switches live near the top of `vars.yml`:
|
||||
|
||||
## Re-running
|
||||
|
||||
The playbook is designed to be repeatable. Zen, Bun, Rust, Starship, npm tools,
|
||||
services, and configuration files are checked before changes are made. Zen
|
||||
The playbook is designed to be repeatable. Brave Origin, Rust, Starship, npm tools,
|
||||
services, and configuration files are checked before changes are made. Brave Origin
|
||||
handles browser updates itself after the initial binary installation.
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
when: install_jdtls
|
||||
- ansible.builtin.import_tasks: tasks/sqlcmd.yml
|
||||
when: install_sqlcmd
|
||||
- ansible.builtin.import_tasks: tasks/zen.yml
|
||||
- ansible.builtin.import_tasks: tasks/dotfiles.yml
|
||||
- ansible.builtin.import_tasks: tasks/user_config.yml
|
||||
- ansible.builtin.import_tasks: tasks/pcloud.yml
|
||||
@@ -40,3 +39,4 @@
|
||||
when: install_typora
|
||||
- ansible.builtin.import_tasks: tasks/duckdb.yml
|
||||
when: install_duckdb
|
||||
- ansible.builtin.import_tasks: tasks/rpm.yml
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@
|
||||
- remote
|
||||
- set-url
|
||||
- origin
|
||||
- "{{ dotfiles_ssh_repo }}"
|
||||
- "{{ dotfiles_repo }}"
|
||||
become: false
|
||||
changed_when: false
|
||||
|
||||
|
||||
+9
-1
@@ -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
|
||||
ansible.builtin.get_url:
|
||||
url: "https://install.duckdb.org/v{{ duckdb_version }}/duckdb_cli-linux-amd64.gz"
|
||||
dest: /tmp/duckdb_cli-linux-amd64.gz
|
||||
mode: "0644"
|
||||
timeout: 300
|
||||
when: not duckdb_installed_result.stat.exists
|
||||
|
||||
- name: Install DuckDB CLI
|
||||
ansible.builtin.shell: gzip -dc /tmp/duckdb_cli-linux-amd64.gz > /usr/local/bin/duckdb
|
||||
args:
|
||||
executable: /bin/bash
|
||||
creates: /usr/local/bin/duckdb
|
||||
when: not duckdb_installed_result.stat.exists
|
||||
|
||||
- name: Make DuckDB executable
|
||||
ansible.builtin.file:
|
||||
@@ -18,8 +24,10 @@
|
||||
mode: "0755"
|
||||
owner: root
|
||||
group: root
|
||||
when: not duckdb_installed_result.stat.exists
|
||||
|
||||
- name: Remove DuckDB archive
|
||||
ansible.builtin.file:
|
||||
path: /tmp/duckdb_cli-linux-amd64.gz
|
||||
state: absent
|
||||
when: not duckdb_installed_result.stat.exists
|
||||
|
||||
@@ -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
@@ -68,11 +68,10 @@
|
||||
content: |
|
||||
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||
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 VISUAL=nvim
|
||||
export TERMINAL=foot
|
||||
export BROWSER=zen
|
||||
export GTK_THEME=Adwaita:dark
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
export ELECTRON_OZONE_PLATFORM_HINT=wayland
|
||||
|
||||
+7
-19
@@ -91,24 +91,12 @@
|
||||
when: not starship_binary.stat.exists
|
||||
|
||||
- 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
|
||||
become: true
|
||||
|
||||
- name: Check for Bun
|
||||
ansible.builtin.stat:
|
||||
path: "{{ user_home }}/.bun/bin/bun"
|
||||
become: false
|
||||
register: bun_binary
|
||||
|
||||
- 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
|
||||
- name: Remove the Starship installer
|
||||
ansible.builtin.file:
|
||||
path: /tmp/install_starship.sh
|
||||
state: absent
|
||||
when: not starship_binary.stat.exists
|
||||
|
||||
+17
-7
@@ -1,4 +1,8 @@
|
||||
---
|
||||
- name: Stat Typora installation directory
|
||||
ansible.builtin.stat:
|
||||
path: /opt/typora
|
||||
register: typora_installed_result
|
||||
|
||||
- name: Create Typora install directory
|
||||
ansible.builtin.file:
|
||||
path: /opt/typora
|
||||
@@ -6,6 +10,7 @@
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0755"
|
||||
when: not typora_installed_result.stat.exists
|
||||
|
||||
- name: Download Typora Linux binary archive
|
||||
ansible.builtin.get_url:
|
||||
@@ -13,6 +18,7 @@
|
||||
dest: "{{ typora_archive }}"
|
||||
mode: "0644"
|
||||
timeout: 300
|
||||
when: not typora_installed_result.stat.exists
|
||||
|
||||
- name: Extract Typora
|
||||
ansible.builtin.unarchive:
|
||||
@@ -22,6 +28,7 @@
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0755"
|
||||
when: not typora_installed_result.stat.exists
|
||||
|
||||
- name: Ensure Typora files are readable
|
||||
ansible.builtin.file:
|
||||
@@ -31,6 +38,13 @@
|
||||
group: root
|
||||
mode: "0755"
|
||||
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
|
||||
ansible.builtin.copy:
|
||||
@@ -42,12 +56,7 @@
|
||||
|
||||
cd /opt/typora/bin/Typora-linux-x64
|
||||
exec /opt/typora/bin/Typora-linux-x64/Typora "$@"
|
||||
|
||||
- name: Ensure system desktop application directory exists
|
||||
ansible.builtin.file:
|
||||
path: /usr/local/share/applications
|
||||
state: directory
|
||||
mode: "0755"
|
||||
when: not typora_installed_result.stat.exists
|
||||
|
||||
- name: Create Typora desktop launcher
|
||||
ansible.builtin.copy:
|
||||
@@ -62,3 +71,4 @@
|
||||
Terminal=false
|
||||
Categories=Office;WordProcessor;TextEditor;
|
||||
MimeType=text/markdown;text/x-markdown;
|
||||
when: not typora_installed_result.stat.exists
|
||||
|
||||
-112
@@ -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,7 +1,7 @@
|
||||
# Sway workstation configuration translated from NixOS behavior.
|
||||
set $mod Mod4
|
||||
set $term foot -e tmux new-session -A -s main
|
||||
set $browser zen
|
||||
set $browser brave-origin
|
||||
set $menu rofi -show drun
|
||||
|
||||
font pango:DejaVu Sans Mono 10
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
user_name: "{{ lookup('env', 'USER') }}"
|
||||
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
|
||||
dotfiles_repo: https://git.public.xn--fl-6ja.fo/bl/dotfiles.git
|
||||
jdtls_url: https://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz
|
||||
jdtls_install_dir: "{{ user_home }}/.local/share/jdtls"
|
||||
jdtls_bin_dir: "{{ user_home }}/.local/bin"
|
||||
@@ -14,6 +13,9 @@ jdtls_download_retries: 3
|
||||
jdtls_download_delay: 10
|
||||
install_duckdb: true
|
||||
duckdb_version: "1.5.2"
|
||||
proton_mail_version: "1.13.3/ProtonMail-desktop-beta"
|
||||
proton_pass_version: "1.37.0-1"
|
||||
proton_authenticator_version: "1.1.6-1"
|
||||
|
||||
system_timezone: Atlantic/Faroe
|
||||
system_locale: en_US.UTF-8
|
||||
@@ -41,9 +43,18 @@ fedora_packages:
|
||||
- libtiff
|
||||
- libwebp
|
||||
- openjpeg
|
||||
- tesseract-devel
|
||||
- leptonica-devel
|
||||
- jbig2dec-devel
|
||||
- openjpeg2-devel
|
||||
- tesseract-langpack-eng
|
||||
- tesseract-langpack-dan
|
||||
- tesseract-langpack-isl
|
||||
- tesseract-langpack-fao
|
||||
|
||||
# Development toolchains and libraries
|
||||
- podman
|
||||
- podman-compose
|
||||
- binutils
|
||||
- clang
|
||||
- clang-tools-extra
|
||||
@@ -159,11 +170,6 @@ rustup_components:
|
||||
- rust-analyzer
|
||||
- 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_archive: sqlcmd-linux-amd64.tar.bz2
|
||||
sqlcmd_url: "https://github.com/microsoft/go-sqlcmd/releases/download/v{{ sqlcmd_version }}/{{ sqlcmd_archive }}"
|
||||
|
||||
Reference in New Issue
Block a user