mirror of
https://github.com/fscotto/infra.git
synced 2026-07-29 16:20:01 +00:00
Compare commits
12 Commits
864732c15a
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f39674092 | ||
|
|
23a062a2e4 | ||
|
|
fd9968f205 | ||
|
|
a04b871068 | ||
|
|
cb2010b51e | ||
|
|
f62a535335 | ||
|
|
9ce213a620 | ||
|
|
3e4c699acc | ||
|
|
034137c0d9 | ||
|
|
e36e36a77e | ||
|
|
7b0e02bc9b | ||
|
|
800cdf7c31 |
20
AGENTS.md
20
AGENTS.md
@@ -1,6 +1,6 @@
|
||||
# AGENTS.md
|
||||
|
||||
Ansible-driven personal infrastructure repo for Fedora and Void desktops, Linux Mint and FreeBSD transition targets, Linux workstations, WSL, and an Ubuntu server.
|
||||
Ansible-driven personal infrastructure repo for Fedora and Void desktops, Linux Mint and FreeBSD transition targets, WSL, and an Ubuntu server.
|
||||
|
||||
## Source Of Truth
|
||||
- Main orchestration: `ansible/site.yml`
|
||||
@@ -11,11 +11,10 @@ Ansible-driven personal infrastructure repo for Fedora and Void desktops, Linux
|
||||
- Codex config is rendered from `dotfiles/common/.codex/config.toml.j2` so `model_instructions_file` points to the deployed `~/.config/ai/bootstrap.md`.
|
||||
|
||||
## Topology
|
||||
- Current personal desktop: `ikaros = platform_mint + role_personal_workstation + desktop_cinnamon`
|
||||
- Current personal desktop: `ikaros = platform_fedora + role_personal_workstation + graphical_desktop + desktop_gnome`
|
||||
- Current laptop: `nymph = platform_fedora + graphical_desktop + desktop_gnome`
|
||||
- Void desktop profile is also the base for other future/reference hosts via `platform_void + graphical_desktop`
|
||||
- Native Linux workstation: `deadalus-fedora`
|
||||
- WSL dev: `deadalus-wsl`
|
||||
- Workstation: `deadalus` is Windows + WSL; Ansible target is `deadalus-wsl`
|
||||
- Ubuntu server: `prometheus`
|
||||
- Hosts intentionally belong to multiple groups; trust `ansible/site.yml` over hostname assumptions.
|
||||
- Inventory axes are independent: `platform_*`, `role_*`, and `desktop_*`. Legacy `void` and `desktop` remain compatibility parents.
|
||||
@@ -37,9 +36,8 @@ Ansible-driven personal infrastructure repo for Fedora and Void desktops, Linux
|
||||
- `ansible-lint ansible/roles`
|
||||
- `yamllint ansible/`
|
||||
- Host-focused dry runs:
|
||||
- Mint desktop work: `ansible-playbook ansible/site.yml --limit ikaros --check --diff`
|
||||
- Fedora desktop work: `ansible-playbook ansible/site.yml --limit ikaros --check --diff`
|
||||
- Fedora laptop work: `ansible-playbook ansible/site.yml --limit nymph --check --diff`
|
||||
- Fedora workstation: `ansible-playbook ansible/site.yml --limit deadalus-fedora --check --diff`
|
||||
- WSL dev: `ansible-playbook ansible/site.yml --limit deadalus-wsl --check --diff`
|
||||
- Server: `ansible-playbook ansible/site.yml --limit prometheus --check --diff`
|
||||
- Focused checks:
|
||||
@@ -57,7 +55,7 @@ Ansible-driven personal infrastructure repo for Fedora and Void desktops, Linux
|
||||
|
||||
## Desktop Notes
|
||||
- `desktop_profile` names independently selectable desktop groups such as `desktop_gnome`, `desktop_hyprland`, `desktop_sway`, `desktop_niri`, and `desktop_cinnamon`. Keep platform-specific session bootstrap in platform-specific roles.
|
||||
- `desktop_environment` selects the mutually exclusive `minimal` (default), `gnome`, `xfce`, or `kde` desktop mode. `profile_desktop_common` owns shared bootstrap; the minimal mode uses `profile_desktop_sway`, `profile_desktop_hyprland`, and `profile_desktop_niri`, `profile_desktop_xfce` owns the reproducible XFCE setup, and `profile_desktop_kde` owns KDE-specific defaults and cleanup. `desktop_sessions_enabled` and `desktop_default_session` apply only to the minimal mode.
|
||||
- `desktop_environment` selects the mutually exclusive `minimal` (default), `gnome`, `xfce`, or `kde` desktop mode. `profile_desktop_common` owns shared Void bootstrap; the minimal mode uses `profile_desktop_sway`, `profile_desktop_hyprland`, and `profile_desktop_niri`, `profile_desktop_xfce` owns the reproducible XFCE setup, `profile_desktop_kde` owns KDE-specific defaults and cleanup, and `profile_desktop_gnome` copies shared desktop dotfiles for Fedora/GNOME without managing GNOME settings. `desktop_sessions_enabled` and `desktop_default_session` apply only to the minimal mode.
|
||||
- Emacs packages and `.emacs.d` deploy are disabled by default via `emacs_enabled: false`; keep the dotfiles in the repo for reversible opt-in only.
|
||||
- NTFS filesystem support is provided by `ntfs-3g` in `ansible/inventory/group_vars/void.yml`.
|
||||
- Void user services are managed by `turnstile` and live under `dotfiles/desktop/.config/service/`.
|
||||
@@ -67,10 +65,10 @@ Ansible-driven personal infrastructure repo for Fedora and Void desktops, Linux
|
||||
- `dotfiles/desktop/.config/hypr/hyprland.conf` plus `host.conf` and `session-env` deployed via `host_hyprland_dotfiles` (Hyprland / Wayland)
|
||||
- `dotfiles/desktop/.config/niri/config.kdl` and `session-env` deployed via `desktop_niri_dotfiles` (Niri / Wayland)
|
||||
- Void Niri lives in `profile_desktop_niri`, gated on `'niri' in desktop_sessions_enabled`; it installs the `emptty` `niri.desktop` session, the `/usr/local/bin/start-niri` launcher, and the xdg-desktop-portal config, mirroring `profile_desktop_sway`.
|
||||
- Fedora GNOME (`desktop_gnome`) currently assumes GNOME comes from the Fedora Workstation base install; Ansible does not customize GNOME for `nymph` yet.
|
||||
- Fedora GNOME (`desktop_gnome`) assumes GNOME comes from the Fedora Workstation base install; Ansible deploys shared desktop dotfiles and git/GPG config for `ikaros` and `nymph`, not GNOME settings.
|
||||
- FreeBSD Niri (dormant; `platform_freebsd` currently has no hosts) must keep FreeBSD-specific package, rc, DBus, seat, portal, and launcher behavior in `profile_desktop_niri_freebsd` or FreeBSD platform vars.
|
||||
- Do not switch or restart a display manager during a playbook run from an active graphical session. Changing among `emptty`, LightDM, and SDDM requires an explicit run from another TTY/SSH session with `desktop_allow_display_manager_switch=true`. Apply managed XFCE XML while logged out of XFCE so `xfconfd` cannot overwrite it from its in-memory state.
|
||||
- `nymph` is the Fedora/GNOME laptop target; keep GNOME unmanaged for now and add host-specific tuning only after real use.
|
||||
- `nymph` is the Fedora/GNOME laptop target; keep GNOME settings unmanaged for now and add host-specific tuning only after real use.
|
||||
|
||||
## Void Package And Dotfile Bucket Rules
|
||||
`platform_void` is the reusable Void platform selection. The legacy `void` group remains a compatibility parent so existing `group_vars/void.yml` and `when: "'void' in group_names"` checks keep working during the transition.
|
||||
@@ -83,8 +81,8 @@ The Void desktop package lists in `ansible/inventory/group_vars/void.yml` are ke
|
||||
The dotfile vars follow the same split: `desktop_common_dotfiles` carries mode-independent content, `desktop_minimal_dotfiles` carries Thunar, Udiskie, and minimal MIME defaults, and `desktop_xfce_dotfiles` carries XFCE state. KDE uses its own MIME defaults. `desktop_void_dotfiles` remains reserved for files that need the Void runtime.
|
||||
|
||||
## Workstation Notes
|
||||
- Native Linux workstation hosts can combine `workstation_host_linux` with an OS-specific dev group.
|
||||
- `deadalus-fedora` keeps GNOME managed settings in `ansible/inventory/host_vars/deadalus-fedora.yml`.
|
||||
- `deadalus` is modeled as Windows + WSL; keep Linux dev automation on `deadalus-wsl`.
|
||||
- Native Linux workstation groups remain available for future hosts but have no current host in the main inventory.
|
||||
|
||||
## Coding Agent Notes
|
||||
- Shared agent packages live in `ai_agents_npm_packages` in `ansible/inventory/group_vars/all.yml`.
|
||||
|
||||
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
||||
|
||||
## What this repo is
|
||||
|
||||
Ansible-driven personal infrastructure as code for Void Linux desktops (`ikaros`, `nymph`), Linux workstations (`deadalus-fedora`, `deadalus-wsl`), and an Ubuntu server (`prometheus`). See `AGENTS.md` for topology and `README.md` for full profile descriptions.
|
||||
Ansible-driven personal infrastructure as code for Fedora desktops (`ikaros`, `nymph`), WSL development (`deadalus-wsl`), and an Ubuntu server (`prometheus`). See `AGENTS.md` for topology and `README.md` for full profile descriptions.
|
||||
|
||||
## Validation commands
|
||||
|
||||
@@ -15,7 +15,6 @@ ansible-playbook ansible/site.yml --syntax-check
|
||||
# Dry-run per host
|
||||
ansible-playbook ansible/site.yml --limit ikaros --check --diff
|
||||
ansible-playbook ansible/site.yml --limit nymph --check --diff
|
||||
ansible-playbook ansible/site.yml --limit deadalus-fedora --check --diff
|
||||
ansible-playbook ansible/site.yml --limit deadalus-wsl --check --diff
|
||||
ansible-playbook ansible/site.yml --limit prometheus --check --diff
|
||||
|
||||
|
||||
88
README.md
88
README.md
@@ -36,7 +36,6 @@ infra/
|
||||
│ ├── workstation/
|
||||
│ ├── workstation_host_linux/
|
||||
│ ├── workstation_dev_wsl/
|
||||
│ ├── ikaros/
|
||||
│ └── nymph/
|
||||
│
|
||||
├── scripts/
|
||||
@@ -55,8 +54,8 @@ Il repository è diviso in due componenti principali:
|
||||
|
||||
# Macchine gestite
|
||||
|
||||
Il repository modella attualmente tre tipologie di profilo, con i filoni workstation Linux nativa e WSL.
|
||||
La nuova direzione del repository separa tre assi indipendenti:
|
||||
Il repository modella attualmente host Fedora/GNOME, un ambiente WSL di sviluppo e un server Ubuntu.
|
||||
La composizione resta separata in assi indipendenti:
|
||||
|
||||
```text
|
||||
common user environment
|
||||
@@ -70,7 +69,7 @@ Matrice target:
|
||||
|
||||
| Host | Platform | Role | Desktop |
|
||||
| -------------- | ---------- | -------------------- | --------------------------------- |
|
||||
| ikaros | Linux Mint | Personal workstation | Cinnamon |
|
||||
| ikaros | Fedora | Personal workstation | GNOME |
|
||||
| nymph | Fedora | Desktop laptop | GNOME |
|
||||
| void-reference | Void Linux | Lab/reference | Current preserved desktop profile |
|
||||
|
||||
@@ -81,23 +80,14 @@ ikaros must be boring
|
||||
nymph is allowed to break
|
||||
```
|
||||
|
||||
`ikaros` usa il target stabile Linux Mint/Cinnamon; `nymph` usa il target
|
||||
Fedora Workstation/GNOME. I gruppi legacy `void` e `desktop` restano alias di
|
||||
`ikaros` usa Fedora Workstation/GNOME come desktop personale stabile; `nymph` usa lo stesso
|
||||
target Fedora Workstation/GNOME come laptop. I gruppi legacy `void` e `desktop` restano alias di
|
||||
compatibilita per eventuali host Void futuri mentre i nuovi assi sono
|
||||
`platform_*`, `role_*` e `desktop_*`.
|
||||
|
||||
Prima di una migrazione reale degli host e consigliato creare uno snapshot
|
||||
logico, per esempio:
|
||||
|
||||
```bash
|
||||
git switch -c refactor/platform-role-desktop
|
||||
git tag void-desktop-before-platform-refactor
|
||||
```
|
||||
|
||||
Nota sullo stato attuale del playbook principale:
|
||||
|
||||
- `ansible/site.yml` applica oggi in automatico Cinnamon su Linux Mint e Niri su FreeBSD
|
||||
- `ansible/site.yml` applica la workstation Linux nativa separando il layer dev comune dal layer host GNOME
|
||||
- `ansible/site.yml` applica oggi in automatico Fedora/GNOME su `ikaros` e `nymph`
|
||||
- `ansible/site.yml` applica anche il ramo `workstation_dev_wsl` per il modello dev in WSL
|
||||
- `ansible/site.yml` applica anche il profilo `ubuntu_server` con baseline apt, systemd, dotfiles server e firewall UFW
|
||||
|
||||
@@ -105,8 +95,8 @@ Nota sullo stato attuale del playbook principale:
|
||||
|
||||
Target operativi:
|
||||
|
||||
- `ikaros`: Linux Mint + Cinnamon, desktop personale stabile/floating.
|
||||
- `nymph`: Fedora Workstation + GNOME, laptop desktop con GNOME non personalizzato da Ansible per ora.
|
||||
- `ikaros`: Fedora Workstation + GNOME, desktop personale stabile/floating.
|
||||
- `nymph`: Fedora Workstation + GNOME, laptop desktop con dotfiles desktop condivisi e GNOME lasciato al default Fedora.
|
||||
|
||||
Il profilo Void desktop resta disponibile come modello riutilizzabile per host
|
||||
futuri. `desktop_environment` continua a selezionare in modo esclusivo
|
||||
@@ -141,17 +131,16 @@ Lo stato attuale del profilo desktop include, tra le altre cose:
|
||||
|
||||
Sistemi operativi supportati:
|
||||
|
||||
- Fedora Workstation nativa
|
||||
- Ubuntu WSL
|
||||
- Ubuntu WSL, attualmente usato da `deadalus-wsl`
|
||||
- Fedora Workstation nativa, disponibile per host futuri tramite gruppi dedicati
|
||||
|
||||
Desktop environment host Linux:
|
||||
Desktop environment host Linux, per eventuali workstation native:
|
||||
|
||||
- GNOME
|
||||
|
||||
Macchine attuali:
|
||||
|
||||
- `deadalus-fedora` come workstation Fedora nativa
|
||||
- `deadalus-wsl` come ambiente dev Ubuntu in WSL
|
||||
- `deadalus-wsl` come ambiente dev Ubuntu in WSL sulla workstation Windows `deadalus`
|
||||
|
||||
Questo profilo è pensato per sviluppo e lavoro, con separazione tra layer host e layer dev.
|
||||
|
||||
@@ -160,8 +149,8 @@ Nel modello Ansible usato qui, un singolo inventory host puo appartenere intenzi
|
||||
Il profilo workstation e agganciato al playbook principale e ora distingue:
|
||||
|
||||
- layer dev Ubuntu condiviso tra WSL e server
|
||||
- layer dev Fedora nativo
|
||||
- layer host Linux GNOME
|
||||
- layer dev Fedora nativo disponibile per host futuri
|
||||
- layer host Linux GNOME disponibile per host futuri
|
||||
- layer WSL dedicato per sviluppo con `systemd`
|
||||
|
||||
Per esempio, lo stesso host Linux puo stare in `workstation_host_linux` e in `workstation_dev_fedora`, a seconda del layering che vuoi comporre.
|
||||
@@ -169,14 +158,13 @@ Per esempio, lo stesso host Linux puo stare in `workstation_host_linux` e in `wo
|
||||
Lo stato attuale del profilo workstation include:
|
||||
|
||||
- installazione pacchetti base Ubuntu via apt
|
||||
- installazione pacchetti base Fedora via dnf per il ramo workstation nativo
|
||||
- installazione pacchetti base Fedora via dnf per eventuali workstation native
|
||||
- installazione e configurazione di Docker dal repository ufficiale
|
||||
- gestione dei dotfiles workstation e rendering dei template dev condivisi
|
||||
- installazione di Google Chrome su Fedora, `VS Code` su Fedora via repository RPM Microsoft, `IntelliJ IDEA Ultimate` su Fedora via COPR RPM, e applicazioni workstation residue su Fedora via Flatpak
|
||||
- estensioni GNOME sul solo host Linux nativo
|
||||
- installazione opzionale di Google Chrome, VS Code, IntelliJ IDEA Ultimate e applicazioni Flatpak per eventuali workstation Fedora native
|
||||
- estensioni GNOME per eventuali host Linux nativi
|
||||
- preparazione del ramo WSL Ubuntu con `systemd` per il toolchain di sviluppo
|
||||
- attivazione del firewall `firewalld` su Fedora nativa
|
||||
- gestione di `gsettings` GNOME host-specifici su `deadalus-fedora`, inclusi shell, Files/Nautilus, file chooser GTK e GNOME Text Editor, allineati allo stato reale della macchina
|
||||
- attivazione del firewall `firewalld` sui target Fedora che dichiarano regole host-specifiche
|
||||
|
||||
Workflow WSL previsto:
|
||||
|
||||
@@ -251,7 +239,7 @@ common configuration
|
||||
Esempi correnti:
|
||||
|
||||
```text
|
||||
ikaros -> common + platform_mint + role_personal_workstation + desktop_cinnamon + ikaros
|
||||
ikaros -> common + platform_fedora + role_personal_workstation + graphical_desktop + desktop_gnome + ikaros
|
||||
nymph -> common + platform_fedora + graphical_desktop + desktop_gnome + nymph
|
||||
```
|
||||
|
||||
@@ -281,8 +269,10 @@ I principali ruoli attualmente presenti sono:
|
||||
| services_systemd | gestione servizi systemd |
|
||||
| services_freebsd | gestione servizi FreeBSD rc.conf/rc.d |
|
||||
| profile_desktop_common | bootstrap desktop Void condiviso |
|
||||
| profile_desktop_gnome | dotfiles desktop condivisi per Fedora/GNOME |
|
||||
| profile_desktop_sway | sessione desktop sway / SwayFX (Wayland) |
|
||||
| profile_desktop_hyprland | sessione desktop Hyprland (Wayland) |
|
||||
| profile_desktop_niri | sessione desktop Niri su Void (Wayland) |
|
||||
| profile_desktop_niri_freebsd | adattamenti FreeBSD per Niri |
|
||||
| profile_desktop_cinnamon | impostazioni Cinnamon circoscritte |
|
||||
| profile_desktop_host | override desktop specifici per host |
|
||||
@@ -304,7 +294,7 @@ Il playbook `ansible/site.yml` e attualmente composto da blocchi per asse:
|
||||
```text
|
||||
all -> dotfiles_common
|
||||
platform_void -> packages_void + services_runit
|
||||
platform_void & graphical_desktop -> profile_desktop_common + profile_desktop_sway + profile_desktop_hyprland + profile_desktop_kde + profile_desktop_xfce + profile_desktop_host
|
||||
platform_void & graphical_desktop -> profile_desktop_common + profile_desktop_sway + profile_desktop_hyprland + profile_desktop_niri + profile_desktop_kde + profile_desktop_xfce + profile_desktop_host
|
||||
platform_mint -> packages_mint + services_systemd
|
||||
platform_mint & role_personal_workstation -> profile_personal_workstation
|
||||
platform_mint & desktop_cinnamon -> profile_desktop_cinnamon
|
||||
@@ -312,6 +302,8 @@ platform_freebsd -> packages_freebsd + services_freebsd
|
||||
platform_freebsd & role_lab -> profile_lab
|
||||
platform_freebsd & desktop_niri -> profile_desktop_niri_freebsd
|
||||
platform_fedora -> packages_fedora + services_systemd
|
||||
platform_fedora & role_personal_workstation -> profile_personal_workstation
|
||||
platform_fedora & desktop_gnome -> profile_desktop_gnome
|
||||
workstation_dev_fedora -> profile_workstation_dev_common
|
||||
workstation_host_linux -> profile_workstation_gnome
|
||||
workstation_dev_wsl -> packages_ubuntu + services_systemd + profile_workstation_dev_common + profile_workstation_dev_wsl
|
||||
@@ -320,10 +312,9 @@ ubuntu_server -> packages_ubuntu + services_systemd + profile_server
|
||||
|
||||
Questo significa che, allo stato attuale:
|
||||
|
||||
- `ikaros` riceve Linux Mint/Cinnamon come target stabile
|
||||
- `ikaros` riceve Fedora Workstation/GNOME come target desktop personale stabile
|
||||
- `nymph` riceve Fedora Workstation/GNOME come target laptop
|
||||
- il profilo Void resta selezionabile tramite `platform_void + graphical_desktop` per host futuri
|
||||
- la workstation Fedora (`deadalus-fedora`) usa il principio di composizione a gruppi con il ramo Fedora dedicato e con `gsettings` host-specifici dichiarati in inventory
|
||||
- il ramo WSL (`deadalus-wsl`) e predisposto con play dev dedicato
|
||||
- il server Ubuntu (`prometheus`) e gestito con pacchetti, servizi, dotfiles server e firewall
|
||||
- lo stack container server include `navidrome`, `postgres`, `gitea`, `nginx-proxy-manager` e `syncthing`, con GUI Syncthing raggiungibile tramite la rete Docker `web`
|
||||
@@ -342,7 +333,6 @@ dotfiles/
|
||||
├── workstation
|
||||
├── workstation_host_linux
|
||||
├── workstation_dev_wsl
|
||||
├── ikaros
|
||||
└── nymph
|
||||
```
|
||||
|
||||
@@ -398,11 +388,11 @@ 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/Hyprland/Niri e override specifici per host
|
||||
- per `platform_mint` e `platform_freebsd` applica solo host presenti esplicitamente in quei gruppi; nell'inventory principale iniziale questi gruppi sono vuoti
|
||||
- per `platform_fedora` applica pacchetti Fedora e servizi systemd
|
||||
- per `workstation_dev_fedora` applica il profilo dev comune
|
||||
- per `workstation_host_linux` applica il layer host Linux GNOME
|
||||
- per `workstation_dev_wsl` applica pacchetti Ubuntu, servizi systemd, profilo dev comune e tweak WSL dedicati
|
||||
- per `platform_mint`, `platform_freebsd`, `workstation_dev_fedora` e `workstation_host_linux` non applica nulla finche quei gruppi restano senza host
|
||||
- per `platform_fedora` applica pacchetti Fedora e servizi systemd a `ikaros` e `nymph`
|
||||
- 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`
|
||||
- per `workstation_dev_wsl` applica pacchetti Ubuntu, servizi systemd, profilo dev comune e tweak WSL dedicati a `deadalus-wsl`
|
||||
- per gli host `ubuntu_server` applica pacchetti Ubuntu, servizi systemd, profilo server, UFW, dotfiles e template dedicati
|
||||
- non riavvia automaticamente il display manager; i passaggi tra `emptty`, LightDM e SDDM vanno applicati da SSH o da una TTY separata
|
||||
- carica `secrets/vault.yml` solo se presente
|
||||
@@ -415,7 +405,6 @@ ansible-playbook ansible/site.yml --syntax-check
|
||||
ansible-playbook ansible/site.yml --limit ikaros,nymph --check --diff
|
||||
ansible-playbook ansible/site.yml --limit ikaros --check --diff
|
||||
ansible-playbook ansible/site.yml --limit nymph --check --diff
|
||||
ansible-playbook ansible/site.yml --limit deadalus-fedora --check --diff
|
||||
ansible-playbook ansible/site.yml --limit deadalus-wsl --check --diff
|
||||
ansible-playbook ansible/site.yml --limit prometheus --check --diff
|
||||
ansible-lint ansible/site.yml
|
||||
@@ -462,32 +451,31 @@ Allo stato attuale `ansible/site.yml` espone questi tag:
|
||||
| `always` | pre-task sempre eseguiti, inclusi caricamento vault e validazioni preliminari | common |
|
||||
| `dotfiles` | distribuzione/configurazione dotfiles | tutti i profili |
|
||||
| `dotfiles:common` | dotfiles comuni condivisi | common, workstation, server |
|
||||
| `dotfiles:desktop` | dotfiles desktop | desktop Void |
|
||||
| `dotfiles:desktop` | dotfiles desktop | desktop Void, Fedora/GNOME, FreeBSD/Niri |
|
||||
| `dotfiles:host` | override host-specifici desktop | desktop Void |
|
||||
| `dotfiles:server` | dotfiles dedicati al profilo server | server |
|
||||
| `dotfiles:workstation` | dotfiles dedicati alle workstation | workstation Linux, WSL |
|
||||
| `dotfiles:workstation` | dotfiles dedicati alle workstation | personal workstation, WSL, workstation Linux future |
|
||||
| `emptty` | gestione display manager `emptty` | desktop Void |
|
||||
| `display-manager` | selezione protetta tra `emptty`, LightDM e SDDM | desktop Void |
|
||||
| `kde` | profilo KDE Plasma e relativa pulizia | desktop Void |
|
||||
| `xfce` | profilo XFCE, LightDM e relativa pulizia | desktop Void |
|
||||
| `cinnamon` | impostazioni Cinnamon circoscritte | Linux Mint desktop |
|
||||
| `gnome` | configurazione host GNOME | workstation host Linux, parte desktop |
|
||||
| `gnome` | configurazione host GNOME | Fedora/GNOME desktop, workstation host Linux future |
|
||||
| `sway` | sessione/configurazione sway / SwayFX (Wayland) | desktop Void |
|
||||
| `hyprland` | sessione/configurazione Hyprland (Wayland) | desktop Void |
|
||||
| `niri` | sessione/configurazione Niri (Wayland) | FreeBSD laptop |
|
||||
| `npm` | installazione pacchetti npm globali | desktop Void, workstation Linux, WSL |
|
||||
| `niri` | sessione/configurazione Niri (Wayland) | Void o FreeBSD con `desktop_niri` |
|
||||
| `npm` | installazione pacchetti npm globali | Fedora/GNOME, desktop Void, workstation Linux, WSL |
|
||||
| `nvidia` | componenti NVIDIA desktop | desktop Void |
|
||||
| `packages` | installazione e aggiornamento pacchetti | tutti i profili |
|
||||
| `services` | gestione servizi runit/systemd | tutti i profili |
|
||||
| `vscode` | installazione/configurazione VS Code | Fedora, host Linux |
|
||||
| `vscode` | installazione/configurazione VS Code | workstation Fedora future, host Linux |
|
||||
| `wsl` | bootstrap e configurazione WSL | WSL |
|
||||
|
||||
Esempi pratici:
|
||||
|
||||
```bash
|
||||
ansible-playbook ansible/site.yml --limit nymph --tags dotfiles:desktop,niri --check --diff
|
||||
ansible-playbook ansible/site.yml --limit ikaros --tags cinnamon --check --diff
|
||||
ansible-playbook ansible/site.yml --limit deadalus-fedora --tags packages,vscode --check --diff
|
||||
ansible-playbook ansible/site.yml --limit nymph --tags dotfiles:desktop,gnome --check --diff
|
||||
ansible-playbook ansible/site.yml --limit ikaros --tags gnome --check --diff
|
||||
ansible-playbook ansible/site.yml --limit prometheus --tags services,dotfiles:server --check --diff
|
||||
```
|
||||
|
||||
|
||||
@@ -33,6 +33,18 @@ common_packages:
|
||||
- zip
|
||||
- zoxide
|
||||
|
||||
vim_plugins_enabled: true
|
||||
vim_plugin_distro_packages:
|
||||
- fzf
|
||||
- vim-fugitive
|
||||
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
|
||||
|
||||
common_dotfiles:
|
||||
- name: .bashrc
|
||||
src: .bashrc
|
||||
|
||||
@@ -9,16 +9,21 @@ desktop_default_session: gnome
|
||||
fedora_desktop_packages:
|
||||
# Fedora equivalents of the development/tooling packages previously pulled by
|
||||
# the Void desktop profile.
|
||||
- 7zip
|
||||
- nodejs-bash-language-server
|
||||
- bluez
|
||||
- bridge-utils
|
||||
- cmake
|
||||
- cscope
|
||||
- ctags
|
||||
- delve
|
||||
- dnsmasq
|
||||
- fastfetch
|
||||
- poppler-glib
|
||||
- poppler-utils
|
||||
- fontconfig-devel
|
||||
- freetype-devel
|
||||
- gh
|
||||
- golang
|
||||
- golangci-lint
|
||||
- gopls
|
||||
@@ -26,32 +31,54 @@ fedora_desktop_packages:
|
||||
- libvirt
|
||||
- libreoffice
|
||||
- liberation-fonts
|
||||
- libasan
|
||||
- libvterm-devel
|
||||
- libX11-devel
|
||||
- libXft-devel
|
||||
- meld
|
||||
- mpv
|
||||
- pdfarranger
|
||||
- pinentry-gnome3
|
||||
- plocate
|
||||
- playerctl
|
||||
- podman-compose
|
||||
- qemu
|
||||
- qemu-img
|
||||
- qemu-tools
|
||||
- rclone
|
||||
- remmina
|
||||
- ruff
|
||||
- rustup
|
||||
- rsync
|
||||
- shfmt
|
||||
- ruff
|
||||
- syncthing
|
||||
- tealdeer
|
||||
- terminus-fonts
|
||||
- texlive
|
||||
- tmux
|
||||
- wl-clipboard
|
||||
- ty
|
||||
- uv
|
||||
- valgrind
|
||||
- virt-manager
|
||||
- virt-install
|
||||
- wireplumber
|
||||
- yt-dlp
|
||||
- zstd
|
||||
|
||||
fedora_nerd_fonts_version: v3.3.0
|
||||
fedora_nerd_fonts:
|
||||
- Hack
|
||||
- JetBrainsMono
|
||||
- Iosevka
|
||||
- UbuntuSans
|
||||
- NerdFontsSymbolsOnly
|
||||
|
||||
fedora_flatpak_packages:
|
||||
- be.alexandervanhee.gradia
|
||||
- ch.protonmail.protonmail-bridge
|
||||
- com.spotify.Client
|
||||
- org.mozilla.thunderbird
|
||||
- org.telegram.desktop
|
||||
|
||||
fedora_npm_packages: "{{ ai_agents_npm_packages }}"
|
||||
|
||||
@@ -5,6 +5,19 @@ 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 }}"
|
||||
|
||||
@@ -96,5 +96,7 @@ mint_flatpak_packages:
|
||||
mint_nerd_fonts_version: v3.3.0
|
||||
mint_nerd_fonts:
|
||||
- Hack
|
||||
- JetBrainsMono
|
||||
- Iosevka
|
||||
- UbuntuSans
|
||||
- NerdFontsSymbolsOnly
|
||||
|
||||
@@ -3,3 +3,16 @@ platform_profile: void
|
||||
platform_family: void
|
||||
platform_package_manager: xbps
|
||||
platform_service_manager: runit
|
||||
|
||||
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
|
||||
|
||||
@@ -7,6 +7,7 @@ effective_user_group: "{{ server_user_group }}"
|
||||
effective_user_home: "{{ server_user_home }}"
|
||||
server_container_stack_dir: /opt/docker/server
|
||||
ai_agents_enabled: false
|
||||
vim_plugins_enabled: false
|
||||
|
||||
profile_packages:
|
||||
- avahi-daemon
|
||||
|
||||
@@ -28,3 +28,8 @@ workstation_dev_wsl_dotfiles:
|
||||
- src: .tmux.conf
|
||||
dest: .tmux.conf
|
||||
mode: "0644"
|
||||
source_dir: desktop
|
||||
- src: .tmux/bin/
|
||||
dest: .tmux/bin/
|
||||
mode: preserve
|
||||
source_dir: desktop
|
||||
|
||||
@@ -1,177 +0,0 @@
|
||||
---
|
||||
hostname: deadalus-fedora
|
||||
|
||||
host_packages: []
|
||||
host_enabled_services:
|
||||
- docker
|
||||
workstation_firewall_backend: firewalld
|
||||
|
||||
workstation_host_vscode_extensions:
|
||||
- ms-vscode-remote.remote-containers
|
||||
- ms-vscode-remote.remote-ssh
|
||||
- ms-azuretools.vscode-docker
|
||||
- redhat.vscode-yaml
|
||||
- redhat.ansible
|
||||
|
||||
workstation_gnome_managed_settings:
|
||||
- schema: org.gnome.shell
|
||||
key: favorite-apps
|
||||
value: "['google-chrome.desktop', 'org.gnome.Nautilus.desktop', 'com.spotify.Client.desktop', 'org.mozilla.Thunderbird.desktop', 'org.telegram.desktop.desktop', 'code.desktop', 'intellij-idea-ultimate.desktop', 'io.dbeaver.DBeaverCommunity.desktop', 'com.getpostman.Postman.desktop', 'org.gnome.Ptyxis.desktop']"
|
||||
- schema: org.gnome.shell
|
||||
key: app-picker-layout
|
||||
value: "[{'6f4bfcaf-700e-4fe3-8fd2-4a3e6fc46bcf': <{'position': <0>}>, 'System': <{'position': <1>}>, 'Utilities': <{'position': <2>}>, 'org.gnome.Contacts.desktop': <{'position': <3>}>, 'org.gnome.Weather.desktop': <{'position': <4>}>, 'org.gnome.clocks.desktop': <{'position': <5>}>, 'org.gnome.Maps.desktop': <{'position': <6>}>, 'org.gnome.SimpleScan.desktop': <{'position': <7>}>, 'org.gnome.Settings.desktop': <{'position': <8>}>, 'org.gnome.Boxes.desktop': <{'position': <9>}>, 'org.gnome.Showtime.desktop': <{'position': <10>}>, 'org.gnome.Snapshot.desktop': <{'position': <11>}>, 'org.gnome.Characters.desktop': <{'position': <12>}>, 'org.gnome.Calculator.desktop': <{'position': <13>}>, 'org.gnome.Calendar.desktop': <{'position': <14>}>, 'org.gnome.TextEditor.desktop': <{'position': <15>}>, 'org.gnome.Meld.desktop': <{'position': <16>}>, 'org.gnome.tweaks.desktop': <{'position': <17>}>, 'org.gnome.Software.desktop': <{'position': <18>}>}]"
|
||||
- schema: org.gnome.desktop.input-sources
|
||||
key: sources
|
||||
value: "[('xkb', 'us')]"
|
||||
- schema: org.gnome.desktop.interface
|
||||
key: color-scheme
|
||||
value: "'prefer-dark'"
|
||||
- schema: org.gnome.desktop.privacy
|
||||
key: report-technical-problems
|
||||
value: "false"
|
||||
- schema: org.gnome.desktop.wm.preferences
|
||||
key: button-layout
|
||||
value: "'appmenu:minimize,maximize,close'"
|
||||
- schema: org.gnome.nautilus.preferences
|
||||
key: click-policy
|
||||
value: "'double'"
|
||||
- schema: org.gnome.nautilus.preferences
|
||||
key: date-time-format
|
||||
value: "'simple'"
|
||||
- schema: org.gnome.nautilus.preferences
|
||||
key: default-folder-viewer
|
||||
value: "'icon-view'"
|
||||
- schema: org.gnome.nautilus.preferences
|
||||
key: default-sort-order
|
||||
value: "'name'"
|
||||
- schema: org.gnome.nautilus.preferences
|
||||
key: recursive-search
|
||||
value: "'local-only'"
|
||||
- schema: org.gnome.nautilus.preferences
|
||||
key: show-create-link
|
||||
value: "true"
|
||||
- schema: org.gnome.nautilus.preferences
|
||||
key: show-delete-permanently
|
||||
value: "true"
|
||||
- schema: org.gnome.nautilus.preferences
|
||||
key: show-directory-item-counts
|
||||
value: "'local-only'"
|
||||
- schema: org.gnome.nautilus.preferences
|
||||
key: show-hidden-files
|
||||
value: "false"
|
||||
- schema: org.gnome.nautilus.preferences
|
||||
key: show-image-thumbnails
|
||||
value: "'local-only'"
|
||||
- schema: org.gnome.nautilus.preferences
|
||||
key: thumbnail-limit
|
||||
value: "uint64 50"
|
||||
- schema: org.gnome.nautilus.icon-view
|
||||
key: captions
|
||||
value: "['none', 'none', 'none']"
|
||||
- schema: org.gnome.nautilus.icon-view
|
||||
key: default-zoom-level
|
||||
value: "'medium'"
|
||||
- schema: org.gtk.Settings.FileChooser
|
||||
key: clock-format
|
||||
value: "'24h'"
|
||||
- schema: org.gtk.Settings.FileChooser
|
||||
key: date-format
|
||||
value: "'regular'"
|
||||
- schema: org.gtk.Settings.FileChooser
|
||||
key: location-mode
|
||||
value: "'path-bar'"
|
||||
- schema: org.gtk.Settings.FileChooser
|
||||
key: show-hidden
|
||||
value: "false"
|
||||
- schema: org.gtk.Settings.FileChooser
|
||||
key: show-size-column
|
||||
value: "true"
|
||||
- schema: org.gtk.Settings.FileChooser
|
||||
key: show-type-column
|
||||
value: "true"
|
||||
- schema: org.gtk.Settings.FileChooser
|
||||
key: sort-column
|
||||
value: "'name'"
|
||||
- schema: org.gtk.gtk4.Settings.FileChooser
|
||||
key: clock-format
|
||||
value: "'24h'"
|
||||
- schema: org.gtk.gtk4.Settings.FileChooser
|
||||
key: date-format
|
||||
value: "'regular'"
|
||||
- schema: org.gtk.gtk4.Settings.FileChooser
|
||||
key: location-mode
|
||||
value: "'path-bar'"
|
||||
- schema: org.gtk.gtk4.Settings.FileChooser
|
||||
key: show-hidden
|
||||
value: "false"
|
||||
- schema: org.gtk.gtk4.Settings.FileChooser
|
||||
key: show-size-column
|
||||
value: "true"
|
||||
- schema: org.gtk.gtk4.Settings.FileChooser
|
||||
key: show-type-column
|
||||
value: "true"
|
||||
- schema: org.gtk.gtk4.Settings.FileChooser
|
||||
key: sort-column
|
||||
value: "'name'"
|
||||
- schema: org.gtk.gtk4.Settings.FileChooser
|
||||
key: sort-directories-first
|
||||
value: "true"
|
||||
- schema: org.gnome.TextEditor
|
||||
key: auto-indent
|
||||
value: "true"
|
||||
- schema: org.gnome.TextEditor
|
||||
key: highlight-matching-brackets
|
||||
value: "true"
|
||||
- schema: org.gnome.TextEditor
|
||||
key: indent-style
|
||||
value: "'tab'"
|
||||
- schema: org.gnome.TextEditor
|
||||
key: keybindings
|
||||
value: "'default'"
|
||||
- schema: org.gnome.TextEditor
|
||||
key: restore-session
|
||||
value: "true"
|
||||
- schema: org.gnome.TextEditor
|
||||
key: show-line-numbers
|
||||
value: "false"
|
||||
- schema: org.gnome.TextEditor
|
||||
key: spellcheck
|
||||
value: "true"
|
||||
- schema: org.gnome.TextEditor
|
||||
key: style-scheme
|
||||
value: "'Adwaita'"
|
||||
- schema: org.gnome.TextEditor
|
||||
key: style-variant
|
||||
value: "'follow'"
|
||||
- schema: org.gnome.TextEditor
|
||||
key: use-system-font
|
||||
value: "true"
|
||||
- schema: org.gnome.TextEditor
|
||||
key: wrap-text
|
||||
value: "true"
|
||||
- schema: org.gnome.desktop.background
|
||||
key: picture-uri
|
||||
value: "'file:///usr/share/backgrounds/gnome/lcd-rainbow-l.jxl'"
|
||||
- schema: org.gnome.desktop.background
|
||||
key: picture-uri-dark
|
||||
value: "'file:///usr/share/backgrounds/gnome/lcd-rainbow-d.jxl'"
|
||||
|
||||
workstation_gnome_extension_dconf_settings:
|
||||
- path: /org/gnome/shell/extensions/paperwm/
|
||||
key: selection-border-radius-bottom
|
||||
value: "15"
|
||||
- path: /org/gnome/shell/extensions/paperwm/
|
||||
key: selection-border-radius-top
|
||||
value: "15"
|
||||
- path: /org/gnome/shell/extensions/paperwm/
|
||||
key: selection-border-size
|
||||
value: "5"
|
||||
- path: /org/gnome/shell/extensions/paperwm/
|
||||
key: show-window-position-bar
|
||||
value: "false"
|
||||
- path: /org/gnome/shell/extensions/paperwm/
|
||||
key: show-workspace-indicator
|
||||
value: "false"
|
||||
- path: /org/gnome/shell/extensions/paperwm/
|
||||
key: window-gap
|
||||
value: "10"
|
||||
@@ -2,16 +2,12 @@
|
||||
hostname: ikaros
|
||||
|
||||
host_packages:
|
||||
- openssh-client
|
||||
- openssh-clients
|
||||
- openssh-server
|
||||
- mesa-vulkan-drivers
|
||||
- xserver-xorg-video-amdgpu
|
||||
|
||||
host_ufw_rules:
|
||||
- rule: allow
|
||||
port: "22"
|
||||
proto: tcp
|
||||
src: "192.168.0.0/24"
|
||||
host_firewalld_rich_rules:
|
||||
- rule family="ipv4" source address="192.168.0.0/24" service name="ssh" accept
|
||||
|
||||
host_sshd_settings:
|
||||
PermitRootLogin: "no"
|
||||
@@ -25,4 +21,257 @@ host_sshd_allow_users:
|
||||
host_authorized_ssh_keys: "{{ vault_ikaros_authorized_ssh_keys | default([]) }}"
|
||||
|
||||
host_enabled_services:
|
||||
- ssh
|
||||
- sshd
|
||||
|
||||
# Host-local GNOME preferences captured from ikaros' live session. Keep these
|
||||
# here rather than in desktop_gnome so nymph remains unmanaged for GNOME
|
||||
# settings until it has its own real-use tuning.
|
||||
gnome_gsettings_settings:
|
||||
- schema: org.gnome.GWeather4
|
||||
key: temperature-unit
|
||||
value: "'centigrade'"
|
||||
- schema: org.gnome.Ptyxis
|
||||
key: cursor-shape
|
||||
value: "'block'"
|
||||
- schema: org.gnome.Ptyxis
|
||||
key: default-columns
|
||||
value: "uint32 140"
|
||||
- schema: org.gnome.Ptyxis
|
||||
key: default-profile-uuid
|
||||
value: "'caa3c49ba73a208b4c4b64b56a5cd0af'"
|
||||
- schema: org.gnome.Ptyxis
|
||||
key: default-rows
|
||||
value: "uint32 35"
|
||||
- schema: org.gnome.Ptyxis
|
||||
key: font-name
|
||||
value: "'JetBrainsMono Nerd Font 14'"
|
||||
- schema: org.gnome.Ptyxis
|
||||
key: new-tab-position
|
||||
value: "'last'"
|
||||
- schema: org.gnome.Ptyxis
|
||||
key: profile-uuids
|
||||
value: "['caa3c49ba73a208b4c4b64b56a5cd0af']"
|
||||
- schema: org.gnome.Ptyxis
|
||||
key: restore-session
|
||||
value: "false"
|
||||
- schema: org.gnome.Ptyxis
|
||||
key: restore-window-size
|
||||
value: "false"
|
||||
- schema: org.gnome.Ptyxis
|
||||
key: use-system-font
|
||||
value: "false"
|
||||
- schema: org.gnome.Ptyxis.Profile
|
||||
path: /org/gnome/Ptyxis/Profiles/caa3c49ba73a208b4c4b64b56a5cd0af/
|
||||
key: bold-is-bright
|
||||
value: "true"
|
||||
- schema: org.gnome.Ptyxis.Profile
|
||||
path: /org/gnome/Ptyxis/Profiles/caa3c49ba73a208b4c4b64b56a5cd0af/
|
||||
key: label
|
||||
value: "'Default'"
|
||||
- schema: org.gnome.Ptyxis.Profile
|
||||
path: /org/gnome/Ptyxis/Profiles/caa3c49ba73a208b4c4b64b56a5cd0af/
|
||||
key: palette
|
||||
value: "'linux'"
|
||||
- schema: org.gnome.Ptyxis.Profile
|
||||
path: /org/gnome/Ptyxis/Profiles/caa3c49ba73a208b4c4b64b56a5cd0af/
|
||||
key: scroll-on-output
|
||||
value: "true"
|
||||
- schema: org.gnome.TextEditor
|
||||
key: highlight-current-line
|
||||
value: "true"
|
||||
- schema: org.gnome.TextEditor
|
||||
key: indent-style
|
||||
value: "'space'"
|
||||
- schema: org.gnome.TextEditor
|
||||
key: indent-width
|
||||
value: "-1"
|
||||
- schema: org.gnome.TextEditor
|
||||
key: right-margin-position
|
||||
value: "uint32 120"
|
||||
- schema: org.gnome.TextEditor
|
||||
key: show-line-numbers
|
||||
value: "true"
|
||||
- schema: org.gnome.TextEditor
|
||||
key: show-right-margin
|
||||
value: "true"
|
||||
- schema: org.gnome.TextEditor
|
||||
key: tab-width
|
||||
value: "uint32 4"
|
||||
- schema: org.gnome.desktop.background
|
||||
key: picture-options
|
||||
value: "'zoom'"
|
||||
- schema: org.gnome.desktop.background
|
||||
key: picture-uri
|
||||
value: "'file:///usr/share/backgrounds/gnome/morphogenesis-l.svg'"
|
||||
- schema: org.gnome.desktop.background
|
||||
key: picture-uri-dark
|
||||
value: "'file:///usr/share/backgrounds/gnome/morphogenesis-d.svg'"
|
||||
- schema: org.gnome.desktop.datetime
|
||||
key: automatic-timezone
|
||||
value: "true"
|
||||
- schema: org.gnome.desktop.input-sources
|
||||
key: sources
|
||||
value: "[('xkb', 'us+alt-intl')]"
|
||||
- schema: org.gnome.desktop.interface
|
||||
key: accent-color
|
||||
value: "'blue'"
|
||||
- schema: org.gnome.desktop.interface
|
||||
key: color-scheme
|
||||
value: "'prefer-dark'"
|
||||
- schema: org.gnome.desktop.peripherals.touchpad
|
||||
key: two-finger-scrolling-enabled
|
||||
value: "true"
|
||||
- schema: org.gnome.desktop.privacy
|
||||
key: remove-old-temp-files
|
||||
value: "true"
|
||||
- schema: org.gnome.desktop.privacy
|
||||
key: remove-old-trash-files
|
||||
value: "true"
|
||||
- schema: org.gnome.desktop.privacy
|
||||
key: report-technical-problems
|
||||
value: "false"
|
||||
- schema: org.gnome.desktop.screensaver
|
||||
key: picture-options
|
||||
value: "'zoom'"
|
||||
- schema: org.gnome.desktop.screensaver
|
||||
key: picture-uri
|
||||
value: "'file:///usr/share/backgrounds/gnome/morphogenesis-l.svg'"
|
||||
- schema: org.gnome.desktop.search-providers
|
||||
key: sort-order
|
||||
value: "['org.gnome.Settings.desktop', 'org.gnome.Contacts.desktop', 'org.gnome.Nautilus.desktop']"
|
||||
- schema: org.gnome.desktop.wm.keybindings
|
||||
key: switch-to-workspace-1
|
||||
value: "['<Super>1']"
|
||||
- schema: org.gnome.desktop.wm.keybindings
|
||||
key: switch-to-workspace-2
|
||||
value: "['<Super>2']"
|
||||
- schema: org.gnome.desktop.wm.keybindings
|
||||
key: switch-to-workspace-3
|
||||
value: "['<Super>3']"
|
||||
- schema: org.gnome.desktop.wm.keybindings
|
||||
key: switch-to-workspace-4
|
||||
value: "['<Super>4']"
|
||||
- schema: org.gnome.desktop.wm.keybindings
|
||||
key: switch-to-workspace-5
|
||||
value: "['<Super>5']"
|
||||
- schema: org.gnome.desktop.wm.keybindings
|
||||
key: switch-to-workspace-6
|
||||
value: "['<Super>6']"
|
||||
- schema: org.gnome.desktop.wm.keybindings
|
||||
key: switch-to-workspace-7
|
||||
value: "['<Super>7']"
|
||||
- schema: org.gnome.desktop.wm.keybindings
|
||||
key: switch-to-workspace-8
|
||||
value: "['<Super>8']"
|
||||
- schema: org.gnome.desktop.wm.keybindings
|
||||
key: switch-to-workspace-9
|
||||
value: "['<Super>9']"
|
||||
- schema: org.gnome.desktop.wm.keybindings
|
||||
key: switch-to-workspace-10
|
||||
value: "['<Super>0']"
|
||||
- schema: org.gnome.meld
|
||||
key: highlight-current-line
|
||||
value: "true"
|
||||
- schema: org.gnome.meld
|
||||
key: highlight-syntax
|
||||
value: "true"
|
||||
- schema: org.gnome.meld
|
||||
key: indent-width
|
||||
value: "4"
|
||||
- schema: org.gnome.meld
|
||||
key: insert-spaces-instead-of-tabs
|
||||
value: "true"
|
||||
- schema: org.gnome.meld
|
||||
key: prefer-dark-theme
|
||||
value: "true"
|
||||
- schema: org.gnome.meld
|
||||
key: show-line-numbers
|
||||
value: "true"
|
||||
- schema: org.gnome.meld
|
||||
key: style-scheme
|
||||
value: "'meld-dark'"
|
||||
- schema: org.gnome.meld
|
||||
key: wrap-mode
|
||||
value: "'none'"
|
||||
- schema: org.gnome.nautilus.list-view
|
||||
key: default-zoom-level
|
||||
value: "'large'"
|
||||
- schema: org.gnome.nautilus.list-view
|
||||
key: use-tree-view
|
||||
value: "false"
|
||||
- schema: org.gnome.nautilus.preferences
|
||||
key: default-folder-viewer
|
||||
value: "'list-view'"
|
||||
- schema: org.gnome.nautilus.preferences
|
||||
key: show-create-link
|
||||
value: "true"
|
||||
- schema: org.gnome.nautilus.preferences
|
||||
key: show-delete-permanently
|
||||
value: "true"
|
||||
- schema: org.gnome.settings-daemon.plugins.color
|
||||
key: night-light-enabled
|
||||
value: "true"
|
||||
- schema: org.gnome.settings-daemon.plugins.media-keys
|
||||
key: custom-keybindings
|
||||
value: "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']"
|
||||
- schema: org.gnome.settings-daemon.plugins.media-keys.custom-keybinding
|
||||
path: /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/
|
||||
key: binding
|
||||
value: "'<Super>Return'"
|
||||
- schema: org.gnome.settings-daemon.plugins.media-keys.custom-keybinding
|
||||
path: /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/
|
||||
key: command
|
||||
value: "'ptyxis'"
|
||||
- schema: org.gnome.settings-daemon.plugins.media-keys.custom-keybinding
|
||||
path: /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/
|
||||
key: name
|
||||
value: "'Launch Terminal'"
|
||||
- schema: org.gnome.shell
|
||||
key: app-picker-layout
|
||||
value: >-
|
||||
[{'org.fedoraproject.MediaWriter.desktop': <{'position': <0>}>, 'org.gnome.Contacts.desktop': <{'position': <1>}>, 'org.gnome.Weather.desktop': <{'position': <2>}>, 'org.gnome.clocks.desktop': <{'position': <3>}>, 'org.gnome.Maps.desktop': <{'position': <4>}>, 'org.gnome.SimpleScan.desktop': <{'position': <5>}>, 'org.gnome.Settings.desktop': <{'position': <6>}>, 'org.gnome.Boxes.desktop': <{'position': <7>}>, 'org.gnome.Showtime.desktop': <{'position': <8>}>, 'org.gnome.Snapshot.desktop': <{'position': <9>}>, 'org.gnome.Characters.desktop': <{'position': <10>}>, 'Utilities': <{'position': <11>}>, 'System': <{'position': <12>}>, 'org.gnome.Tour.desktop': <{'position': <13>}>, 'org.gnome.Yelp.desktop': <{'position': <14>}>, 'htop.desktop': <{'position': <15>}>, 'libreoffice-writer.desktop': <{'position': <16>}>, 'libreoffice-calc.desktop': <{'position': <17>}>, 'libreoffice-impress.desktop': <{'position': <18>}>, 'libreoffice-draw.desktop': <{'position': <19>}>, 'libreoffice-math.desktop': <{'position': <20>}>, 'libreoffice-base.desktop': <{'position': <21>}>, 'org.gnome.Meld.desktop': <{'position': <22>}>, 'mpv.desktop': <{'position': <23>}>}, {'com.github.jeromerobert.pdfarranger.desktop': <{'position': <0>}>, 'org.remmina.Remmina.desktop': <{'position': <1>}>, 'ch.protonmail.protonmail-bridge.desktop': <{'position': <2>}>, 'org.gnome.TextEditor.desktop': <{'position': <3>}>, 'org.gnome.Software.desktop': <{'position': <4>}>, 'org.gnome.Calculator.desktop': <{'position': <5>}>, 'org.gnome.Calendar.desktop': <{'position': <6>}>, 'com.mattjakeman.ExtensionManager.desktop': <{'position': <7>}>, 'be.alexandervanhee.gradia.desktop': <{'position': <8>}>, 'syncthing-start.desktop': <{'position': <9>}>, 'syncthing-ui.desktop': <{'position': <10>}>}]
|
||||
- schema: org.gnome.shell
|
||||
key: disabled-extensions
|
||||
value: >-
|
||||
['window-list@gnome-shell-extensions.gcampax.github.com', 'background-logo@fedorahosted.org', 'apps-menu@gnome-shell-extensions.gcampax.github.com', 'places-menu@gnome-shell-extensions.gcampax.github.com', 'maximize-new-windows@VitalyOstanin']
|
||||
- schema: org.gnome.shell
|
||||
key: enabled-extensions
|
||||
value: >-
|
||||
['status-icons@gnome-shell-extensions.gcampax.github.com', 'gnome-ui-tune@itstime.tech', 'appindicatorsupport@rgcjonas.gmail.com', 'bluetooth-battery-monitor@v8v88v8v88.com', 'clipboard-indicator@tudmotu.com', 'status-area-horizontal-spacing@mathematical.coffee.gmail.com', 'MaximizeWindowIntoNewWorkspace@kyleross.com']
|
||||
- schema: org.gnome.shell
|
||||
key: favorite-apps
|
||||
value: >-
|
||||
['org.gnome.Nautilus.desktop', 'org.mozilla.firefox.desktop', 'com.spotify.Client.desktop', 'org.mozilla.thunderbird.desktop', 'org.telegram.desktop.desktop', 'org.gnome.Ptyxis.desktop', 'virt-manager.desktop']
|
||||
- schema: org.gnome.shell
|
||||
key: remember-mount-password
|
||||
value: "true"
|
||||
- schema: org.gnome.shell.keybindings
|
||||
key: switch-to-application-1
|
||||
value: "@as []"
|
||||
- schema: org.gnome.shell.keybindings
|
||||
key: switch-to-application-2
|
||||
value: "@as []"
|
||||
- schema: org.gnome.shell.keybindings
|
||||
key: switch-to-application-3
|
||||
value: "@as []"
|
||||
- schema: org.gnome.shell.keybindings
|
||||
key: switch-to-application-4
|
||||
value: "@as []"
|
||||
- schema: org.gnome.shell.keybindings
|
||||
key: switch-to-application-5
|
||||
value: "@as []"
|
||||
- schema: org.gnome.shell.keybindings
|
||||
key: switch-to-application-6
|
||||
value: "@as []"
|
||||
- schema: org.gnome.shell.keybindings
|
||||
key: switch-to-application-7
|
||||
value: "@as []"
|
||||
- schema: org.gnome.shell.keybindings
|
||||
key: switch-to-application-8
|
||||
value: "@as []"
|
||||
- schema: org.gnome.shell.keybindings
|
||||
key: switch-to-application-9
|
||||
value: "@as []"
|
||||
- schema: org.gnome.system.location
|
||||
key: enabled
|
||||
value: "true"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
hostname: nymph
|
||||
|
||||
# Fedora Workstation/GNOME laptop target. GNOME is provided by the base Fedora
|
||||
# Workstation install and is intentionally not customized by Ansible yet.
|
||||
# Workstation install; Ansible deploys shared desktop dotfiles but leaves GNOME
|
||||
# settings unmanaged for now.
|
||||
host_packages: []
|
||||
host_enabled_services: []
|
||||
|
||||
@@ -6,15 +6,13 @@ all:
|
||||
|
||||
platform_fedora:
|
||||
hosts:
|
||||
nymph:
|
||||
ikaros:
|
||||
ansible_connection: local
|
||||
deadalus-fedora:
|
||||
nymph:
|
||||
ansible_connection: local
|
||||
|
||||
platform_mint:
|
||||
hosts:
|
||||
ikaros:
|
||||
ansible_connection: local
|
||||
hosts: {}
|
||||
|
||||
platform_freebsd:
|
||||
hosts: {}
|
||||
@@ -57,13 +55,13 @@ all:
|
||||
|
||||
desktop_gnome:
|
||||
hosts:
|
||||
ikaros:
|
||||
ansible_connection: local
|
||||
nymph:
|
||||
ansible_connection: local
|
||||
|
||||
desktop_cinnamon:
|
||||
hosts:
|
||||
ikaros:
|
||||
ansible_connection: local
|
||||
hosts: {}
|
||||
|
||||
ubuntu:
|
||||
children:
|
||||
@@ -89,19 +87,13 @@ all:
|
||||
ubuntu_server:
|
||||
|
||||
fedora_workstation:
|
||||
hosts:
|
||||
deadalus-fedora:
|
||||
ansible_connection: local
|
||||
hosts: {}
|
||||
|
||||
workstation_host_linux:
|
||||
hosts:
|
||||
deadalus-fedora:
|
||||
ansible_connection: local
|
||||
hosts: {}
|
||||
|
||||
workstation_dev_fedora:
|
||||
hosts:
|
||||
deadalus-fedora:
|
||||
ansible_connection: local
|
||||
hosts: {}
|
||||
|
||||
workstation_dev_wsl:
|
||||
hosts:
|
||||
|
||||
@@ -50,6 +50,53 @@
|
||||
loop_control:
|
||||
label: "{{ item.dest }}"
|
||||
|
||||
- name: Install distro packages for Vim plugins
|
||||
tags: [packages, vim, fzf]
|
||||
ansible.builtin.package:
|
||||
name: "{{ vim_plugin_distro_packages | default([]) }}"
|
||||
state: present
|
||||
when:
|
||||
- vim_plugins_enabled | default(false)
|
||||
- (vim_plugin_distro_packages | default([])) | length > 0
|
||||
|
||||
- name: Ensure git package is installed for source Vim plugins
|
||||
tags: [packages, vim, fzf]
|
||||
ansible.builtin.package:
|
||||
name: git
|
||||
state: present
|
||||
when:
|
||||
- vim_plugins_enabled | default(false)
|
||||
- (vim_plugin_source_plugins | default([])) | length > 0
|
||||
|
||||
- name: Ensure Vim plugin pack directory exists
|
||||
tags: [dotfiles, dotfiles:common, vim, fzf]
|
||||
ansible.builtin.file:
|
||||
path: "{{ effective_user_home }}/.vim/pack/plugins/opt"
|
||||
state: directory
|
||||
owner: "{{ effective_username }}"
|
||||
group: "{{ effective_user_group }}"
|
||||
mode: "0755"
|
||||
when:
|
||||
- vim_plugins_enabled | default(false)
|
||||
- (vim_plugin_source_plugins | default([])) | length > 0
|
||||
|
||||
- name: Install source Vim plugins
|
||||
tags: [dotfiles, dotfiles:common, vim, fzf]
|
||||
ansible.builtin.git:
|
||||
repo: "{{ item.repo }}"
|
||||
dest: "{{ effective_user_home }}/.vim/pack/plugins/opt/{{ item.name }}"
|
||||
version: "{{ item.version }}"
|
||||
update: false
|
||||
become_user: "{{ effective_username }}"
|
||||
environment:
|
||||
HOME: "{{ effective_user_home }}"
|
||||
loop: "{{ vim_plugin_source_plugins | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item.name }}"
|
||||
when:
|
||||
- vim_plugins_enabled | default(false)
|
||||
- (vim_plugin_source_plugins | default([])) | length > 0
|
||||
|
||||
- name: Ensure AI config directories exist
|
||||
tags: [dotfiles, dotfiles:common]
|
||||
ansible.builtin.file:
|
||||
|
||||
@@ -178,3 +178,54 @@
|
||||
remote: "{{ fedora_flatpak_remote_name | default('flathub') }}"
|
||||
method: system
|
||||
when: (packages_fedora_flatpak_packages | default([])) | length > 0
|
||||
|
||||
- name: Ensure Fedora Nerd Fonts base directory exists
|
||||
tags: [packages, fonts]
|
||||
ansible.builtin.file:
|
||||
path: /usr/local/share/fonts/nerd-fonts
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0755"
|
||||
when: (fedora_nerd_fonts | default([])) | length > 0
|
||||
|
||||
- name: Ensure Fedora per-font Nerd Fonts directories exist
|
||||
tags: [packages, fonts]
|
||||
ansible.builtin.file:
|
||||
path: "/usr/local/share/fonts/nerd-fonts/{{ item }}"
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0755"
|
||||
loop: "{{ fedora_nerd_fonts | default([]) }}"
|
||||
|
||||
- name: Download Fedora Nerd Font archives
|
||||
tags: [packages, fonts]
|
||||
ansible.builtin.get_url:
|
||||
url: "https://github.com/ryanoasis/nerd-fonts/releases/download/{{ fedora_nerd_fonts_version }}/{{ item }}.zip"
|
||||
dest: "/usr/local/share/fonts/nerd-fonts/{{ item }}.zip"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
loop: "{{ fedora_nerd_fonts | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item }}"
|
||||
|
||||
- name: Extract Fedora Nerd Font archives
|
||||
tags: [packages, fonts]
|
||||
ansible.builtin.unarchive:
|
||||
src: "/usr/local/share/fonts/nerd-fonts/{{ item }}.zip"
|
||||
dest: "/usr/local/share/fonts/nerd-fonts/{{ item }}"
|
||||
remote_src: true
|
||||
owner: root
|
||||
group: root
|
||||
loop: "{{ fedora_nerd_fonts | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item }}"
|
||||
register: fedora_nerd_fonts_extract
|
||||
|
||||
- name: Refresh system font cache after installing Fedora Nerd Fonts
|
||||
tags: [packages, fonts]
|
||||
ansible.builtin.command: fc-cache -f
|
||||
changed_when: false
|
||||
when: fedora_nerd_fonts_extract is changed
|
||||
|
||||
@@ -190,12 +190,27 @@
|
||||
loop: "{{ desktop_ufw_rules_effective }}"
|
||||
loop_control:
|
||||
label: "{{ item.name | default(item.port) }}"
|
||||
when: workstation_firewall_backend | default('ufw') == 'ufw'
|
||||
|
||||
- name: Enable UFW firewall on desktop when host rules are defined
|
||||
tags: [services, packages]
|
||||
community.general.ufw:
|
||||
state: enabled
|
||||
when: (desktop_ufw_rules_effective | default([])) | length > 0
|
||||
when:
|
||||
- workstation_firewall_backend | default('ufw') == 'ufw'
|
||||
- (desktop_ufw_rules_effective | default([])) | length > 0
|
||||
|
||||
- name: Apply host firewalld rich rules on desktop
|
||||
tags: [services, packages]
|
||||
ansible.posix.firewalld:
|
||||
rich_rule: "{{ item }}"
|
||||
permanent: true
|
||||
immediate: true
|
||||
state: enabled
|
||||
loop: "{{ host_firewalld_rich_rules | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item }}"
|
||||
when: workstation_firewall_backend | default('ufw') == 'firewalld'
|
||||
|
||||
- name: Check whether libvirt service directory exists
|
||||
tags: [packages, services]
|
||||
@@ -337,6 +352,7 @@
|
||||
- tmux-autoreload
|
||||
- tmux-resurrect
|
||||
- tmux-continuum
|
||||
- tmux-yank
|
||||
|
||||
- name: Check whether tmux plugin directories are git checkouts
|
||||
tags: [dotfiles, dotfiles:desktop, tmux]
|
||||
|
||||
16
ansible/roles/profile_desktop_gnome/handlers/main.yml
Normal file
16
ansible/roles/profile_desktop_gnome/handlers/main.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
- name: Reload GNOME gpg-agent
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- gpgconf
|
||||
- --kill
|
||||
- gpg-agent
|
||||
become_user: "{{ username }}"
|
||||
environment:
|
||||
HOME: "{{ user_home }}"
|
||||
changed_when: false
|
||||
|
||||
- name: Reload SSH service
|
||||
ansible.builtin.systemd:
|
||||
name: sshd
|
||||
state: reloaded
|
||||
238
ansible/roles/profile_desktop_gnome/tasks/main.yml
Normal file
238
ansible/roles/profile_desktop_gnome/tasks/main.yml
Normal file
@@ -0,0 +1,238 @@
|
||||
---
|
||||
- name: Ensure GNOME desktop user config directories exist
|
||||
tags: [dotfiles, dotfiles:desktop, gnome]
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "0755"
|
||||
loop:
|
||||
- "{{ user_home }}/.config"
|
||||
- "{{ user_home }}/.config/autostart"
|
||||
- "{{ user_home }}/.local"
|
||||
- "{{ user_home }}/.local/bin"
|
||||
- "{{ user_home }}/.bashrc.d"
|
||||
- "{{ user_home }}/.tmux"
|
||||
- "{{ user_home }}/.tmux/bin"
|
||||
- "{{ user_home }}/.tmux/plugins"
|
||||
|
||||
- name: Ensure GNOME desktop private directories exist
|
||||
tags: [dotfiles, dotfiles:desktop, gnome]
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "{{ item.mode }}"
|
||||
loop:
|
||||
- path: "{{ user_home }}/.gnupg"
|
||||
mode: "0700"
|
||||
- path: "{{ user_home }}/.ssh"
|
||||
mode: "0700"
|
||||
- path: "{{ user_home }}/.local/state/ssh/sockets"
|
||||
mode: "0700"
|
||||
|
||||
- name: Copy GNOME desktop dotfiles
|
||||
tags: [dotfiles, dotfiles:desktop, gnome]
|
||||
ansible.builtin.copy:
|
||||
src: "{{ playbook_dir }}/../dotfiles/desktop/{{ item.src }}"
|
||||
dest: "{{ user_home }}/{{ item.dest }}"
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "{{ item.mode }}"
|
||||
loop: "{{ desktop_common_dotfiles | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item.dest }}"
|
||||
|
||||
- name: Copy GNOME Emacs desktop dotfiles
|
||||
tags: [dotfiles, dotfiles:desktop, emacs, gnome]
|
||||
ansible.builtin.copy:
|
||||
src: "{{ playbook_dir }}/../dotfiles/desktop/{{ item.src }}"
|
||||
dest: "{{ user_home }}/{{ item.dest }}"
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "{{ item.mode }}"
|
||||
loop: "{{ desktop_emacs_dotfiles | default([]) }}"
|
||||
when: emacs_enabled | default(false) | bool
|
||||
loop_control:
|
||||
label: "{{ item.dest }}"
|
||||
|
||||
- name: Configure GNOME gpg-agent for Fedora
|
||||
tags: [dotfiles, dotfiles:desktop, git, gnome]
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ user_home }}/.gnupg/gpg-agent.conf"
|
||||
content: |
|
||||
pinentry-program /usr/bin/pinentry-gnome3
|
||||
enable-ssh-support
|
||||
default-cache-ttl 600
|
||||
max-cache-ttl 7200
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "0600"
|
||||
notify: Reload GNOME gpg-agent
|
||||
|
||||
- name: Render GNOME git configuration with private values
|
||||
tags: [dotfiles, dotfiles:desktop, git, gnome]
|
||||
ansible.builtin.template:
|
||||
src: desktop/.gitconfig.j2
|
||||
dest: "{{ user_home }}/.gitconfig"
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "0644"
|
||||
|
||||
- name: Gather GNOME desktop user account data
|
||||
tags: [gnome]
|
||||
ansible.builtin.getent:
|
||||
database: passwd
|
||||
key: "{{ username }}"
|
||||
when: (gnome_gsettings_settings | default([])) | length > 0
|
||||
|
||||
- name: Set GNOME desktop session environment
|
||||
tags: [gnome]
|
||||
ansible.builtin.set_fact:
|
||||
gnome_user_uid: "{{ ansible_facts.getent_passwd[username][1] }}"
|
||||
gnome_gsettings_environment:
|
||||
HOME: "{{ user_home }}"
|
||||
XDG_RUNTIME_DIR: "/run/user/{{ ansible_facts.getent_passwd[username][1] }}"
|
||||
DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{ ansible_facts.getent_passwd[username][1] }}/bus"
|
||||
when: (gnome_gsettings_settings | default([])) | length > 0
|
||||
|
||||
- name: Read current GNOME managed settings
|
||||
tags: [gnome]
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- gsettings
|
||||
- get
|
||||
- "{{ item.schema }}{{ ':' ~ item.path if item.path is defined else '' }}"
|
||||
- "{{ item.key }}"
|
||||
become_user: "{{ username }}"
|
||||
environment: "{{ gnome_gsettings_environment }}"
|
||||
loop: "{{ gnome_gsettings_settings | default([]) }}"
|
||||
loop_control:
|
||||
label: >-
|
||||
{{ item.schema }}{{ ':' ~ item.path if item.path is defined else '' }} {{ item.key }}
|
||||
register: gnome_gsettings_current
|
||||
changed_when: false
|
||||
|
||||
- name: Apply GNOME managed settings
|
||||
tags: [gnome]
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- gsettings
|
||||
- set
|
||||
- "{{ item.item.schema }}{{ ':' ~ item.item.path if item.item.path is defined else '' }}"
|
||||
- "{{ item.item.key }}"
|
||||
- "{{ item.item.value }}"
|
||||
become_user: "{{ username }}"
|
||||
environment: "{{ gnome_gsettings_environment }}"
|
||||
loop: "{{ gnome_gsettings_current.results | default([]) }}"
|
||||
loop_control:
|
||||
label: >-
|
||||
{{ item.item.schema }}{{ ':' ~ item.item.path if item.item.path is defined else '' }} {{ item.item.key }}
|
||||
changed_when: true
|
||||
when: item.stdout | trim != item.item.value
|
||||
|
||||
- name: Check whether SSH host ed25519 key exists on GNOME desktop
|
||||
tags: [services, gnome]
|
||||
ansible.builtin.stat:
|
||||
path: /etc/ssh/ssh_host_ed25519_key
|
||||
register: gnome_ssh_host_ed25519_key
|
||||
when:
|
||||
- (host_sshd_settings | default({})) | length > 0
|
||||
or (host_sshd_allow_users | default([])) | length > 0
|
||||
|
||||
- name: Generate missing SSH host keys on GNOME desktop
|
||||
tags: [services, gnome]
|
||||
ansible.builtin.command: ssh-keygen -A
|
||||
changed_when: true
|
||||
when:
|
||||
- (host_sshd_settings | default({})) | length > 0
|
||||
or (host_sshd_allow_users | default([])) | length > 0
|
||||
- not gnome_ssh_host_ed25519_key.stat.exists
|
||||
|
||||
- name: Define safe GNOME SSH daemon settings
|
||||
tags: [services, gnome]
|
||||
ansible.builtin.set_fact:
|
||||
gnome_sshd_settings_effective: >-
|
||||
{{
|
||||
host_sshd_settings | default({})
|
||||
if (
|
||||
(host_authorized_ssh_keys | default([])) | length > 0
|
||||
or (host_sshd_settings | default({})).PasswordAuthentication | default('yes') != 'no'
|
||||
)
|
||||
else (
|
||||
host_sshd_settings | default({}) | dict2items
|
||||
| rejectattr('key', 'in', ['PasswordAuthentication', 'KbdInteractiveAuthentication'])
|
||||
| items2dict
|
||||
)
|
||||
}}
|
||||
|
||||
- name: Warn when keeping SSH password authentication enabled on GNOME desktop
|
||||
tags: [services, gnome]
|
||||
ansible.builtin.debug:
|
||||
msg: >-
|
||||
SSH password authentication hardening was skipped because no authorized SSH
|
||||
keys are defined for this host. Set host_authorized_ssh_keys via vault
|
||||
variables, then re-run the playbook to disable password authentication.
|
||||
when:
|
||||
- "'sshd' in (host_enabled_services | default([]))"
|
||||
- (host_sshd_settings | default({})).PasswordAuthentication | default('yes') == 'no'
|
||||
- (host_authorized_ssh_keys | default([])) | length == 0
|
||||
|
||||
- name: Ensure GNOME desktop user authorized_keys file exists
|
||||
tags: [services, dotfiles, gnome]
|
||||
ansible.builtin.file:
|
||||
path: "{{ user_home }}/.ssh/authorized_keys"
|
||||
state: touch
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "0600"
|
||||
when: (host_authorized_ssh_keys | default([])) | length > 0
|
||||
|
||||
- name: Manage GNOME desktop user authorized SSH keys exclusively
|
||||
tags: [services, dotfiles, gnome]
|
||||
ansible.posix.authorized_key:
|
||||
user: "{{ username }}"
|
||||
key: "{{ host_authorized_ssh_keys | join('\n') }}"
|
||||
state: present
|
||||
exclusive: true
|
||||
manage_dir: false
|
||||
when: (host_authorized_ssh_keys | default([])) | length > 0
|
||||
|
||||
- name: Apply SSH daemon settings on GNOME desktop
|
||||
tags: [services, gnome]
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/ssh/sshd_config
|
||||
regexp: '^\s*{{ item.key }}\s+'
|
||||
line: "{{ item.key }} {{ item.value }}"
|
||||
state: present
|
||||
validate: "sshd -t -f %s"
|
||||
notify: Reload SSH service
|
||||
loop: "{{ gnome_sshd_settings_effective | default({}) | dict2items }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
when: (gnome_sshd_settings_effective | default({})) | length > 0
|
||||
|
||||
- name: Restrict SSH login to allowed GNOME desktop users
|
||||
tags: [services, gnome]
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/ssh/sshd_config
|
||||
regexp: '^\s*AllowUsers\s+'
|
||||
line: "AllowUsers {{ host_sshd_allow_users | join(' ') }}"
|
||||
state: present
|
||||
validate: "sshd -t -f %s"
|
||||
notify: Reload SSH service
|
||||
when: (host_sshd_allow_users | default([])) | length > 0
|
||||
|
||||
- name: Apply host firewalld rich rules on GNOME desktop
|
||||
tags: [services, packages, gnome]
|
||||
ansible.posix.firewalld:
|
||||
rich_rule: "{{ item }}"
|
||||
permanent: true
|
||||
immediate: true
|
||||
state: enabled
|
||||
loop: "{{ host_firewalld_rich_rules | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item }}"
|
||||
when: workstation_firewall_backend | default('firewalld') == 'firewalld'
|
||||
@@ -1,8 +1,21 @@
|
||||
---
|
||||
- name: Ensure WSL tmux directories exist
|
||||
tags: [dotfiles, dotfiles:workstation, tmux, wsl]
|
||||
ansible.builtin.file:
|
||||
path: "{{ user_home }}/{{ item }}"
|
||||
state: directory
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "0755"
|
||||
loop:
|
||||
- .tmux
|
||||
- .tmux/bin
|
||||
- .tmux/plugins
|
||||
|
||||
- name: Copy workstation WSL dotfiles
|
||||
tags: [dotfiles, dotfiles:workstation, wsl]
|
||||
ansible.builtin.copy:
|
||||
src: "{{ playbook_dir }}/../dotfiles/workstation_dev_wsl/{{ item.src }}"
|
||||
src: "{{ playbook_dir }}/../dotfiles/{{ item.source_dir | default('workstation_dev_wsl') }}/{{ item.src }}"
|
||||
dest: "{{ user_home }}/{{ item.dest }}"
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
|
||||
@@ -102,6 +102,20 @@
|
||||
- packages_fedora
|
||||
- services_systemd
|
||||
|
||||
- name: Configure personal workstation role on Fedora
|
||||
hosts: platform_fedora:&role_personal_workstation
|
||||
become: true
|
||||
|
||||
roles:
|
||||
- profile_personal_workstation
|
||||
|
||||
- name: Configure Fedora GNOME desktop
|
||||
hosts: platform_fedora:&desktop_gnome
|
||||
become: true
|
||||
|
||||
roles:
|
||||
- profile_desktop_gnome
|
||||
|
||||
- name: Configure Fedora workstation development layer
|
||||
hosts: workstation_dev_fedora
|
||||
become: true
|
||||
|
||||
@@ -92,6 +92,10 @@
|
||||
sslBackend = gnutls
|
||||
sslCAInfo = ~/.local/share/certs/ecaas.datacenter.comune.roma.crt
|
||||
|
||||
[http "https://gitlab.datacenter.comune.roma"]
|
||||
sslBackend = gnutls
|
||||
sslCAInfo = ~/.local/share/certs/datacenter.comune.roma.crt
|
||||
|
||||
[credential]
|
||||
helper = store
|
||||
|
||||
|
||||
@@ -227,10 +227,31 @@ bind '"\e[5C": forward-word'
|
||||
bind '"\e[5D": backward-word'
|
||||
|
||||
# =========================
|
||||
# fzf history on Ctrl-r
|
||||
# fzf: Ptyxis Linux Minimal
|
||||
# =========================
|
||||
|
||||
if command -v fzf >/dev/null 2>&1; then
|
||||
FZF_PTYXIS_LINUX_OPTS="
|
||||
--layout=reverse
|
||||
--border=rounded
|
||||
--height=40%
|
||||
--info=inline
|
||||
--prompt='› '
|
||||
--pointer='›'
|
||||
--marker='✓'
|
||||
--separator='─'
|
||||
--scrollbar='│'
|
||||
--color=bg:#000000,bg+:#000000,gutter:#000000
|
||||
--color=fg:#d7d7d7,fg+:#ffffff,hl:#55ff55,hl+:#55ff55
|
||||
--color=prompt:#55ff55,pointer:#5555ff,marker:#ffff55,spinner:#5555ff
|
||||
--color=info:#808080,header:#808080,border:#303030
|
||||
"
|
||||
export FZF_DEFAULT_OPTS="${FZF_DEFAULT_OPTS:+$FZF_DEFAULT_OPTS }$FZF_PTYXIS_LINUX_OPTS"
|
||||
|
||||
# =========================
|
||||
# fzf history on Ctrl-r
|
||||
# =========================
|
||||
|
||||
__fzf_history() {
|
||||
local selected history_data
|
||||
|
||||
@@ -252,7 +273,7 @@ if command -v fzf >/dev/null 2>&1; then
|
||||
)"
|
||||
fi
|
||||
|
||||
selected="$(printf '%s\n' "$history_data" | fzf --height 40% --layout=reverse --border --prompt='history> ')" || return
|
||||
selected="$(printf '%s\n' "$history_data" | fzf --prompt='history> ')" || return
|
||||
|
||||
READLINE_LINE=$selected
|
||||
READLINE_POINT=${#READLINE_LINE}
|
||||
|
||||
@@ -89,7 +89,7 @@ nnoremap <silent> <leader>h :set hlsearch!<CR>
|
||||
" ----------------------------------------------------------
|
||||
|
||||
set updatetime=250
|
||||
set timeoutlen=400
|
||||
set timeoutlen=800
|
||||
set ttimeoutlen=10
|
||||
set shortmess+=c
|
||||
|
||||
@@ -149,6 +149,139 @@ endif
|
||||
nnoremap <silent> <leader>g :silent grep! <C-R><C-W> .<CR>:copen<CR>
|
||||
nnoremap <leader>/ :silent grep!<Space>
|
||||
|
||||
" ----------------------------------------------------------
|
||||
" Optional plugins
|
||||
" ----------------------------------------------------------
|
||||
|
||||
" Plugins are installed out-of-band by Ansible when available. Keep this
|
||||
" vimrc usable as a standalone onefile: load optional packages only when they
|
||||
" exist and keep builtin fallbacks for the mappings below.
|
||||
let s:fzf_min_version = [0, 54, 0]
|
||||
|
||||
function! s:PackAdd(package) abort
|
||||
silent! execute "packadd " . a:package
|
||||
endfunction
|
||||
|
||||
function! s:PackAddForCommand(package, command) abort
|
||||
if exists(":" . a:command) == 2
|
||||
return 1
|
||||
endif
|
||||
|
||||
call s:PackAdd(a:package)
|
||||
return exists(":" . a:command) == 2
|
||||
endfunction
|
||||
|
||||
function! s:PackAddByRuntimeFile(runtime_file, command) abort
|
||||
if exists(":" . a:command) == 2
|
||||
return 1
|
||||
endif
|
||||
|
||||
" Distro packages and source installs do not always use the same Vim package
|
||||
" directory name. Look for a package containing the expected runtime file and
|
||||
" load it by its actual directory name.
|
||||
for l:packpath in split(&packpath, ",")
|
||||
let l:packages = glob(l:packpath . "/pack/*/opt/*", 0, 1)
|
||||
\ + glob(l:packpath . "/pack/*/start/*", 0, 1)
|
||||
for l:package_dir in l:packages
|
||||
if filereadable(l:package_dir . "/" . a:runtime_file)
|
||||
call s:PackAdd(fnamemodify(l:package_dir, ":t"))
|
||||
if exists(":" . a:command) == 2
|
||||
return 1
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
endfor
|
||||
|
||||
return 0
|
||||
endfunction
|
||||
|
||||
let s:has_fzf = s:PackAddForCommand("fzf", "FZF")
|
||||
\ || s:PackAddByRuntimeFile("plugin/fzf.vim", "FZF")
|
||||
let s:has_fzf_vim = s:has_fzf
|
||||
\ && (s:PackAddForCommand("fzf.vim", "Files")
|
||||
\ || s:PackAddByRuntimeFile("autoload/fzf/vim.vim", "Files"))
|
||||
let s:has_vim_fugitive = s:PackAddForCommand("vim-fugitive", "Git")
|
||||
\ || s:PackAddByRuntimeFile("autoload/fugitive.vim", "Git")
|
||||
|
||||
function! s:FzfExecutable() abort
|
||||
if executable("fzf")
|
||||
return "fzf"
|
||||
endif
|
||||
|
||||
return ""
|
||||
endfunction
|
||||
|
||||
function! s:FzfVersionOk() abort
|
||||
let l:fzf = s:FzfExecutable()
|
||||
if empty(l:fzf)
|
||||
return 0
|
||||
endif
|
||||
|
||||
let l:version = matchstr(get(systemlist(l:fzf . " --version"), 0, ""), '^\d\+\.\d\+\.\d\+')
|
||||
if empty(l:version)
|
||||
return 0
|
||||
endif
|
||||
|
||||
let l:parts = map(split(l:version, '\.'), 'str2nr(v:val)')
|
||||
return l:parts[0] > s:fzf_min_version[0]
|
||||
\ || (l:parts[0] == s:fzf_min_version[0] && l:parts[1] > s:fzf_min_version[1])
|
||||
\ || (l:parts[0] == s:fzf_min_version[0] && l:parts[1] == s:fzf_min_version[1]
|
||||
\ && l:parts[2] >= s:fzf_min_version[2])
|
||||
endfunction
|
||||
|
||||
if s:has_fzf_vim && s:FzfVersionOk()
|
||||
let g:fzf_layout = {"down": "40%"}
|
||||
let g:fzf_colors = {
|
||||
\ "fg": ["fg", "Normal"],
|
||||
\ "bg": ["bg", "Normal"],
|
||||
\ "hl": ["fg", "Search"],
|
||||
\ "fg+": ["fg", "Normal"],
|
||||
\ "bg+": ["bg", "Normal"],
|
||||
\ "hl+": ["fg", "Search"],
|
||||
\ "info": ["fg", "Comment"],
|
||||
\ "prompt": ["fg", "String"],
|
||||
\ "pointer": ["fg", "Statement"],
|
||||
\ "marker": ["fg", "WarningMsg"],
|
||||
\ "spinner": ["fg", "Statement"],
|
||||
\ "header": ["fg", "Comment"],
|
||||
\ }
|
||||
let g:fzf_vim = get(g:, "fzf_vim", {})
|
||||
let g:fzf_vim.preview_window = ["right,50%", "ctrl-/"]
|
||||
endif
|
||||
|
||||
function! s:FzfCommand(command) abort
|
||||
if s:has_fzf_vim && s:FzfVersionOk() && exists(":" . a:command) == 2
|
||||
execute a:command
|
||||
elseif a:command ==# "Files" || a:command ==# "GFiles" || a:command ==# "GitFiles"
|
||||
edit .
|
||||
elseif a:command ==# "Buffers"
|
||||
ls
|
||||
elseif a:command ==# "Rg"
|
||||
silent grep! <cword> .
|
||||
copen
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:GitStatus() abort
|
||||
if s:has_vim_fugitive && exists(":Git") == 2
|
||||
Git
|
||||
elseif executable("git")
|
||||
botright new
|
||||
setlocal buftype=nofile bufhidden=wipe noswapfile nobuflisted
|
||||
silent read !git status --short --branch
|
||||
1delete _
|
||||
file git-status
|
||||
else
|
||||
echohl WarningMsg | echom "git executable not found" | echohl None
|
||||
endif
|
||||
endfunction
|
||||
|
||||
nnoremap <silent> <leader>ff :call <SID>FzfCommand("Files")<CR>
|
||||
nnoremap <silent> <leader>fg :call <SID>FzfCommand("GFiles")<CR>
|
||||
nnoremap <silent> <leader>fb :call <SID>FzfCommand("Buffers")<CR>
|
||||
nnoremap <silent> <leader>fr :call <SID>FzfCommand("Rg")<CR>
|
||||
nnoremap <silent> <leader>gs :call <SID>GitStatus()<CR>
|
||||
|
||||
" ----------------------------------------------------------
|
||||
" Quickfix / location list
|
||||
" ----------------------------------------------------------
|
||||
|
||||
102
dotfiles/common/.vimrc.shortcuts.md
Normal file
102
dotfiles/common/.vimrc.shortcuts.md
Normal file
@@ -0,0 +1,102 @@
|
||||
# Vim shortcuts
|
||||
|
||||
Configurazione sorgente: `.vimrc`.
|
||||
|
||||
- Leader: `Space`
|
||||
- Local leader: `\\`
|
||||
- Le shortcut sotto sono pensate per normal mode, salvo dove indicato.
|
||||
- `timeoutlen` è impostato a `800 ms`: premi le sequenze con leader senza aspettare troppo.
|
||||
|
||||
## Base
|
||||
|
||||
| Shortcut | Azione |
|
||||
|---|---|
|
||||
| `Space l` | Toggle caratteri invisibili / whitespace |
|
||||
| `Space h` | Toggle evidenziazione ricerca |
|
||||
| `Space w` | Salva file corrente |
|
||||
| `Space q` | Chiudi finestra corrente |
|
||||
| `Space x` | Salva e chiudi |
|
||||
| `Space z` | Toggle fold sotto il cursore |
|
||||
|
||||
## Ricerca
|
||||
|
||||
| Shortcut | Azione |
|
||||
|---|---|
|
||||
| `Space g` | Cerca la parola sotto il cursore nel progetto e apre quickfix |
|
||||
| `Space /` | Avvia `:grep!` manuale |
|
||||
|
||||
## FZF / file / Git
|
||||
|
||||
Queste shortcut usano `fzf.vim` quando disponibile; altrimenti cadono su fallback portabili.
|
||||
|
||||
| Shortcut | Azione |
|
||||
|---|---|
|
||||
| `Space ff` | `:Files`, fallback `:edit .` |
|
||||
| `Space fg` | `:GFiles`, fallback `:edit .` |
|
||||
| `Space fb` | `:Buffers`, fallback `:ls` |
|
||||
| `Space fr` | `:Rg`, fallback `:grep! <cword> .` + quickfix |
|
||||
| `Space gs` | `:Git` con vim-fugitive, fallback buffer con `git status` |
|
||||
|
||||
## Quickfix e location list
|
||||
|
||||
| Shortcut | Azione |
|
||||
|---|---|
|
||||
| `]q` | Prossimo elemento quickfix |
|
||||
| `[q` | Precedente elemento quickfix |
|
||||
| `Space qo` | Apri quickfix |
|
||||
| `Space qc` | Chiudi quickfix |
|
||||
| `]l` | Prossimo elemento location list |
|
||||
| `[l` | Precedente elemento location list |
|
||||
| `Space lo` | Apri location list |
|
||||
| `Space lc` | Chiudi location list |
|
||||
|
||||
## Finestre
|
||||
|
||||
| Shortcut | Azione |
|
||||
|---|---|
|
||||
| `Ctrl h` | Vai alla finestra a sinistra |
|
||||
| `Ctrl j` | Vai alla finestra sotto |
|
||||
| `Ctrl k` | Vai alla finestra sopra |
|
||||
| `Ctrl l` | Vai alla finestra a destra |
|
||||
|
||||
## Diff
|
||||
|
||||
| Shortcut | Azione |
|
||||
|---|---|
|
||||
| `Space df` | Attiva diff su tutte le finestre |
|
||||
| `Space do` | Disattiva diff su tutte le finestre |
|
||||
|
||||
## Tags e preview
|
||||
|
||||
| Shortcut | Azione |
|
||||
|---|---|
|
||||
| `Space t` | Vai al tag della parola sotto il cursore |
|
||||
| `Space pt` | Apri il tag in preview window |
|
||||
| `Space po` | Apri preview window |
|
||||
| `Space pc` | Chiudi preview window |
|
||||
| `K` | Apri la man page della parola sotto il cursore |
|
||||
|
||||
## Cscope
|
||||
|
||||
Disponibili solo se Vim ha supporto `cscope`.
|
||||
|
||||
| Shortcut | Azione |
|
||||
|---|---|
|
||||
| `Space cs` | Cerca simbolo |
|
||||
| `Space cg` | Cerca definizione |
|
||||
| `Space cd` | Cerca funzioni chiamate dal simbolo |
|
||||
| `Space cc` | Cerca chiamanti |
|
||||
| `Space ct` | Cerca testo |
|
||||
| `Space ce` | Cerca egrep |
|
||||
| `Space ci` | Cerca include |
|
||||
|
||||
Nota: `Space cf` è riservato a ClangFormat, quindi non usarlo per cscope file search.
|
||||
|
||||
## Format, build e run
|
||||
|
||||
| Shortcut | Modo | Azione |
|
||||
|---|---|---|
|
||||
| `Space cf` | normal | Esegue `clang-format` sul file |
|
||||
| `Space cf` | visual | Esegue `clang-format` sulla selezione |
|
||||
| `Space m` | normal | Build smart: `ninja`, `cmake --build build`, `make -C <root>` o `make` |
|
||||
| `Space r` | normal | Salva ed esegue il file corrente; supporta C, Python e shell |
|
||||
@@ -1,18 +1,46 @@
|
||||
#=== BEHAVIOR ===#
|
||||
|
||||
unbind C-b
|
||||
set -g prefix C-x
|
||||
bind-key C-x send-prefix
|
||||
|
||||
set -g renumber-window on
|
||||
set -g base-index 1
|
||||
setw -g pane-base-index 1
|
||||
set -g mouse on
|
||||
set -g history-limit 50000
|
||||
set -s escape-time 0
|
||||
set -g focus-events on
|
||||
set -g detach-on-destroy off
|
||||
|
||||
bind-key c new-window -c '#{pane_current_path}'
|
||||
bind-key | split-window -h -c '#{pane_current_path}'
|
||||
bind-key - split-window -v -c '#{pane_current_path}'
|
||||
bind-key \" split-window -v -c '#{pane_current_path}'
|
||||
bind-key % split-window -h -c '#{pane_current_path}'
|
||||
bind-key r source-file ~/.tmux.conf \; display-message 'tmux configuration reloaded'
|
||||
bind-key y setw synchronize-panes \; display-message 'synchronize-panes #{?pane_synchronized,on,off}'
|
||||
bind-key -n M-Left select-pane -L
|
||||
bind-key -n M-Right select-pane -R
|
||||
bind-key -n M-Up select-pane -U
|
||||
bind-key -n M-Down select-pane -D
|
||||
bind-key -n M-H resize-pane -L 5
|
||||
bind-key -n M-J resize-pane -D 5
|
||||
bind-key -n M-K resize-pane -U 5
|
||||
bind-key -n M-L resize-pane -R 5
|
||||
|
||||
# Session popup: Enter switches, Ctrl-k kills, Ctrl-n creates.
|
||||
bind-key S display-popup -E -w 80% -h 80% "~/.tmux/bin/session-popup '#{pane_current_path}'"
|
||||
bind-key S display-popup -E -x "#{popup_centre_x}" -y "#{popup_centre_y}" -w 95% -h 95% "~/.tmux/bin/session-popup '#{pane_current_path}'"
|
||||
|
||||
#=== COPY MODE ===#
|
||||
|
||||
setw -g mode-keys vi
|
||||
set -g set-clipboard on
|
||||
set -g @yank_action 'copy-pipe-and-cancel'
|
||||
set -g @override_copy_command '~/.tmux/bin/copy-to-clipboard'
|
||||
bind-key -T copy-mode-vi v send -X begin-selection
|
||||
bind-key -T copy-mode-vi C-v send -X rectangle-toggle
|
||||
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel '~/.tmux/bin/copy-to-clipboard'
|
||||
|
||||
#=== TERMINAL ===#
|
||||
|
||||
@@ -29,55 +57,55 @@ set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
set -g @plugin 'b0o/tmux-autoreload'
|
||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||
set -g @plugin 'tmux-plugins/tmux-yank'
|
||||
|
||||
#=== THEME: Yaru Blue Dark ===#
|
||||
#=== THEME: Ptyxis Linux Minimal ===#
|
||||
|
||||
set -g @yaru_bg "#2b2b2e"
|
||||
set -g @yaru_bg_light "#3b3b3e"
|
||||
set -g @yaru_fg "#e0e0e0"
|
||||
set -g @yaru_fg_dim "#9a9a9a"
|
||||
set -g @yaru_blue "#4a90d9"
|
||||
set -g @yaru_blue_b "#6daeea"
|
||||
set -g @yaru_orange "#e95420"
|
||||
set -g @yaru_sep "#4a4a52"
|
||||
set -g @yaru_red "#c7162b"
|
||||
set -g @yaru_green "#4caf50"
|
||||
set -g @linux_bg "#000000"
|
||||
set -g @linux_fg "#d7d7d7"
|
||||
set -g @linux_dim "#808080"
|
||||
set -g @linux_sep "#303030"
|
||||
set -g @linux_blue "#5555ff"
|
||||
set -g @linux_green "#55ff55"
|
||||
set -g @linux_yellow "#ffff55"
|
||||
set -g @linux_red "#ff5555"
|
||||
|
||||
set -g status-position top
|
||||
set -g status-style "bg=#{@yaru_bg}"
|
||||
set -g status-left-length 120
|
||||
set -g status-position bottom
|
||||
set -g status-style "bg=#{@linux_bg},fg=#{@linux_dim}"
|
||||
set -g status-left-length 100
|
||||
set -g status-right-length 80
|
||||
set -g status-interval 5
|
||||
|
||||
set -g status-left ""
|
||||
set -ga status-left "#[bg=#{@yaru_bg},fg=#{@yaru_blue},bold] #S "
|
||||
set -ga status-left "#[bg=#{@yaru_bg},fg=#{@yaru_sep}]│"
|
||||
set -ga status-left "#[bg=#{@yaru_bg},fg=#{@yaru_fg_dim}] #{pane_current_command} "
|
||||
set -ga status-left "#[bg=#{@yaru_bg},fg=#{@yaru_sep}]│"
|
||||
set -ga status-left "#[bg=#{@yaru_bg},fg=#{@yaru_blue_b}] #{=/-40/...:#{s|$USER|~|:#{b:pane_current_path}}} "
|
||||
set -ga status-left "#[bg=#{@yaru_bg},fg=#{@yaru_sep}]#{?window_zoomed_flag,│,}"
|
||||
set -ga status-left "#[bg=#{@yaru_bg},fg=#{@yaru_orange}]#{?window_zoomed_flag, zoom ,}"
|
||||
set -ga status-left "#[fg=#{@linux_green},bold] #S "
|
||||
set -ga status-left "#[fg=#{@linux_sep}]·"
|
||||
set -ga status-left "#[fg=#{@linux_dim}] #{pane_current_command} "
|
||||
set -ga status-left "#[fg=#{@linux_sep}]·"
|
||||
set -ga status-left "#[fg=#{@linux_fg}] #{=/-36/...:#{s|$USER|~|:#{b:pane_current_path}}} "
|
||||
|
||||
set -g status-right ""
|
||||
set -ga status-right "#[bg=#{@yaru_bg},fg=#{@yaru_sep}]│"
|
||||
set -ga status-right "#[bg=#{@yaru_bg},fg=#{@yaru_blue_b}] #H"
|
||||
set -ga status-right "#[fg=#{@linux_yellow}]#{?pane_synchronized, sync ,}"
|
||||
set -ga status-right "#[fg=#{@linux_blue}]#{?window_zoomed_flag, zoom ,}"
|
||||
set -ga status-right "#[fg=#{@linux_sep}]·"
|
||||
set -ga status-right "#[fg=#{@linux_dim}] #H "
|
||||
|
||||
setw -g pane-border-status off
|
||||
setw -g pane-active-border-style "fg=#{@yaru_blue}"
|
||||
setw -g pane-border-style "fg=#{@yaru_sep}"
|
||||
setw -g pane-active-border-style "fg=#{@linux_blue}"
|
||||
setw -g pane-border-style "fg=#{@linux_sep}"
|
||||
setw -g pane-border-lines single
|
||||
|
||||
set -g message-style "bg=#{@yaru_blue},fg=#{@yaru_bg},bold"
|
||||
set -g message-command-style "bg=#{@yaru_blue},fg=#{@yaru_bg},bold"
|
||||
set -g mode-style "bg=#{@yaru_orange},fg=#{@yaru_bg},bold"
|
||||
set -g message-style "bg=#{@linux_blue},fg=#{@linux_bg},bold"
|
||||
set -g message-command-style "bg=#{@linux_blue},fg=#{@linux_bg},bold"
|
||||
set -g mode-style "bg=#{@linux_yellow},fg=#{@linux_bg},bold"
|
||||
|
||||
set -g window-status-format " #I:#{?#{!=:#{window_name},Window},#W,} "
|
||||
set -g window-status-style "bg=#{@yaru_bg},fg=#{@yaru_fg_dim}"
|
||||
set -g window-status-last-style "bg=#{@yaru_bg},fg=#{@yaru_fg}"
|
||||
set -g window-status-activity-style "bg=#{@yaru_bg},fg=#{@yaru_orange}"
|
||||
set -g window-status-bell-style "bg=#{@yaru_bg},fg=#{@yaru_red},bold"
|
||||
set -gF window-status-separator "#[bg=#{@yaru_bg},fg=#{@yaru_sep}]│"
|
||||
set -g window-status-current-format " #I:#{?#{!=:#{window_name},Window},#W,} "
|
||||
set -g window-status-current-style "bg=#{@yaru_blue},fg=#{@yaru_bg},bold"
|
||||
set -g window-status-format " #I:#W "
|
||||
set -g window-status-style "bg=#{@linux_bg},fg=#{@linux_dim}"
|
||||
set -g window-status-last-style "bg=#{@linux_bg},fg=#{@linux_fg}"
|
||||
set -g window-status-activity-style "bg=#{@linux_bg},fg=#{@linux_yellow}"
|
||||
set -g window-status-bell-style "bg=#{@linux_bg},fg=#{@linux_red},bold"
|
||||
set -gF window-status-separator "#[fg=#{@linux_sep}]·"
|
||||
set -g window-status-current-format " #I:#W "
|
||||
set -g window-status-current-style "bg=#{@linux_bg},fg=#{@linux_green},bold"
|
||||
|
||||
#=== SESSION RESTORE ===#
|
||||
|
||||
|
||||
26
dotfiles/desktop/.tmux/bin/copy-to-clipboard
Executable file
26
dotfiles/desktop/.tmux/bin/copy-to-clipboard
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
if command -v wl-copy >/dev/null 2>&1 && [ -n "${WAYLAND_DISPLAY:-}" ]; then
|
||||
exec wl-copy
|
||||
fi
|
||||
|
||||
if command -v xclip >/dev/null 2>&1 && [ -n "${DISPLAY:-}" ]; then
|
||||
exec xclip -selection clipboard -in
|
||||
fi
|
||||
|
||||
if command -v xsel >/dev/null 2>&1 && [ -n "${DISPLAY:-}" ]; then
|
||||
exec xsel --clipboard --input
|
||||
fi
|
||||
|
||||
if command -v clip.exe >/dev/null 2>&1; then
|
||||
exec clip.exe
|
||||
fi
|
||||
|
||||
if command -v pbcopy >/dev/null 2>&1; then
|
||||
exec pbcopy
|
||||
fi
|
||||
|
||||
cat >/dev/null
|
||||
exit 1
|
||||
@@ -4,6 +4,24 @@ set -eu
|
||||
|
||||
default_dir=${1:-$HOME}
|
||||
|
||||
# tmux popups are launched by the tmux server and may not inherit ~/.bashrc.
|
||||
# Keep fzf visually aligned with the shared Ptyxis Linux Minimal style.
|
||||
FZF_PTYXIS_LINUX_OPTS="
|
||||
--layout=reverse
|
||||
--border=rounded
|
||||
--info=inline
|
||||
--prompt='› '
|
||||
--pointer='›'
|
||||
--marker='✓'
|
||||
--separator='─'
|
||||
--scrollbar='│'
|
||||
--color=bg:#000000,bg+:#000000,gutter:#000000
|
||||
--color=fg:#d7d7d7,fg+:#ffffff,hl:#55ff55,hl+:#55ff55
|
||||
--color=prompt:#55ff55,pointer:#5555ff,marker:#ffff55,spinner:#5555ff
|
||||
--color=info:#808080,header:#808080,border:#303030
|
||||
"
|
||||
export FZF_DEFAULT_OPTS="${FZF_DEFAULT_OPTS:+$FZF_DEFAULT_OPTS }$FZF_PTYXIS_LINUX_OPTS"
|
||||
|
||||
new_session() {
|
||||
printf 'New session name: '
|
||||
IFS= read -r session_name
|
||||
@@ -22,9 +40,7 @@ while :; do
|
||||
selection=$(
|
||||
tmux list-sessions -F '#{session_name}' |
|
||||
fzf \
|
||||
--layout=reverse \
|
||||
--height=100% \
|
||||
--border \
|
||||
--prompt='sessions> ' \
|
||||
--header='Enter switch Ctrl-n new Ctrl-k kill' \
|
||||
--preview 'tmux list-windows -t {} -F "#{window_index}: #{window_name}#{?window_active, [active],}"' \
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
# Prefix and Emacs-style key handling
|
||||
unbind C-b
|
||||
set -g prefix C-x
|
||||
bind C-x send-prefix
|
||||
set -g status-keys emacs
|
||||
setw -g mode-keys emacs
|
||||
|
||||
# General behavior
|
||||
set -g mouse on
|
||||
set -g base-index 1
|
||||
setw -g pane-base-index 1
|
||||
set -g renumber-windows on
|
||||
set -g history-limit 10000
|
||||
set -s escape-time 0
|
||||
set -g focus-events on
|
||||
|
||||
# Keep the current directory when creating windows and panes
|
||||
bind c new-window -c "#{pane_current_path}"
|
||||
bind '"' split-window -v -c "#{pane_current_path}"
|
||||
bind % split-window -h -c "#{pane_current_path}"
|
||||
|
||||
# Reload the configuration with C-x r
|
||||
bind r source-file ~/.tmux.conf \; display-message "tmux configuration reloaded"
|
||||
|
||||
# Terminal capabilities
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -as terminal-features ",xterm-256color:RGB"
|
||||
Reference in New Issue
Block a user