mirror of
https://github.com/fscotto/infra.git
synced 2026-07-29 16:20:01 +00:00
Align Fedora GNOME desktop packages
This commit is contained in:
@@ -9,12 +9,14 @@ desktop_default_session: gnome
|
|||||||
fedora_desktop_packages:
|
fedora_desktop_packages:
|
||||||
# Fedora equivalents of the development/tooling packages previously pulled by
|
# Fedora equivalents of the development/tooling packages previously pulled by
|
||||||
# the Void desktop profile.
|
# the Void desktop profile.
|
||||||
|
- 7zip
|
||||||
- nodejs-bash-language-server
|
- nodejs-bash-language-server
|
||||||
- bluez
|
- bluez
|
||||||
- bridge-utils
|
- bridge-utils
|
||||||
- ctags
|
- ctags
|
||||||
- delve
|
- delve
|
||||||
- dnsmasq
|
- dnsmasq
|
||||||
|
- fastfetch
|
||||||
- poppler-glib
|
- poppler-glib
|
||||||
- poppler-utils
|
- poppler-utils
|
||||||
- fontconfig-devel
|
- fontconfig-devel
|
||||||
@@ -34,26 +36,42 @@ fedora_desktop_packages:
|
|||||||
- mpv
|
- mpv
|
||||||
- pdfarranger
|
- pdfarranger
|
||||||
- pinentry-gnome3
|
- pinentry-gnome3
|
||||||
|
- plocate
|
||||||
- playerctl
|
- playerctl
|
||||||
|
- podman-compose
|
||||||
- qemu
|
- qemu
|
||||||
- qemu-img
|
- qemu-img
|
||||||
- qemu-tools
|
- qemu-tools
|
||||||
|
- rclone
|
||||||
- remmina
|
- remmina
|
||||||
|
- ruff
|
||||||
- rustup
|
- rustup
|
||||||
- rsync
|
- rsync
|
||||||
- shfmt
|
- shfmt
|
||||||
- ruff
|
- syncthing
|
||||||
|
- tealdeer
|
||||||
- terminus-fonts
|
- terminus-fonts
|
||||||
- texlive
|
- texlive
|
||||||
|
- tmux
|
||||||
- ty
|
- ty
|
||||||
- uv
|
- uv
|
||||||
- virt-manager
|
- virt-manager
|
||||||
- virt-install
|
- virt-install
|
||||||
- wireplumber
|
- wireplumber
|
||||||
|
- yt-dlp
|
||||||
- zstd
|
- zstd
|
||||||
|
|
||||||
|
fedora_nerd_fonts_version: v3.3.0
|
||||||
|
fedora_nerd_fonts:
|
||||||
|
- Hack
|
||||||
|
- UbuntuSans
|
||||||
|
- NerdFontsSymbolsOnly
|
||||||
|
|
||||||
fedora_flatpak_packages:
|
fedora_flatpak_packages:
|
||||||
|
- be.alexandervanhee.gradia
|
||||||
- ch.protonmail.protonmail-bridge
|
- ch.protonmail.protonmail-bridge
|
||||||
|
- com.spotify.Client
|
||||||
- org.mozilla.thunderbird
|
- org.mozilla.thunderbird
|
||||||
|
- org.telegram.desktop
|
||||||
|
|
||||||
fedora_npm_packages: "{{ ai_agents_npm_packages }}"
|
fedora_npm_packages: "{{ ai_agents_npm_packages }}"
|
||||||
|
|||||||
@@ -4,10 +4,5 @@ hostname: nymph
|
|||||||
# Fedora Workstation/GNOME laptop target. GNOME is provided by the base Fedora
|
# Fedora Workstation/GNOME laptop target. GNOME is provided by the base Fedora
|
||||||
# Workstation install; Ansible deploys shared desktop dotfiles but leaves GNOME
|
# Workstation install; Ansible deploys shared desktop dotfiles but leaves GNOME
|
||||||
# settings unmanaged for now.
|
# settings unmanaged for now.
|
||||||
host_packages:
|
host_packages: []
|
||||||
- rclone
|
|
||||||
- syncthing
|
|
||||||
host_flatpak_packages:
|
|
||||||
- com.spotify.Client
|
|
||||||
- org.telegram.desktop
|
|
||||||
host_enabled_services: []
|
host_enabled_services: []
|
||||||
|
|||||||
@@ -178,3 +178,54 @@
|
|||||||
remote: "{{ fedora_flatpak_remote_name | default('flathub') }}"
|
remote: "{{ fedora_flatpak_remote_name | default('flathub') }}"
|
||||||
method: system
|
method: system
|
||||||
when: (packages_fedora_flatpak_packages | default([])) | length > 0
|
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
|
||||||
|
|||||||
@@ -99,18 +99,34 @@
|
|||||||
or (host_sshd_allow_users | default([])) | length > 0
|
or (host_sshd_allow_users | default([])) | length > 0
|
||||||
- not gnome_ssh_host_ed25519_key.stat.exists
|
- not gnome_ssh_host_ed25519_key.stat.exists
|
||||||
|
|
||||||
- name: Require authorized SSH keys before disabling password authentication on GNOME desktop
|
- name: Define safe GNOME SSH daemon settings
|
||||||
tags: [services, gnome]
|
tags: [services, gnome]
|
||||||
ansible.builtin.assert:
|
ansible.builtin.set_fact:
|
||||||
that:
|
gnome_sshd_settings_effective: >-
|
||||||
- (host_authorized_ssh_keys | default([])) | length > 0
|
{{
|
||||||
fail_msg: >-
|
host_sshd_settings | default({})
|
||||||
SSH password authentication is disabled for this host, but no authorized SSH
|
if (
|
||||||
keys are defined. Set host_authorized_ssh_keys via vault variables before
|
(host_authorized_ssh_keys | default([])) | length > 0
|
||||||
applying this configuration.
|
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:
|
when:
|
||||||
- "'sshd' in (host_enabled_services | default([]))"
|
- "'sshd' in (host_enabled_services | default([]))"
|
||||||
- (host_sshd_settings | default({})).PasswordAuthentication | default('yes') == 'no'
|
- (host_sshd_settings | default({})).PasswordAuthentication | default('yes') == 'no'
|
||||||
|
- (host_authorized_ssh_keys | default([])) | length == 0
|
||||||
|
|
||||||
- name: Ensure GNOME desktop user authorized_keys file exists
|
- name: Ensure GNOME desktop user authorized_keys file exists
|
||||||
tags: [services, dotfiles, gnome]
|
tags: [services, dotfiles, gnome]
|
||||||
@@ -141,10 +157,10 @@
|
|||||||
state: present
|
state: present
|
||||||
validate: "sshd -t -f %s"
|
validate: "sshd -t -f %s"
|
||||||
notify: Reload SSH service
|
notify: Reload SSH service
|
||||||
loop: "{{ host_sshd_settings | default({}) | dict2items }}"
|
loop: "{{ gnome_sshd_settings_effective | default({}) | dict2items }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.key }}"
|
label: "{{ item.key }}"
|
||||||
when: (host_sshd_settings | default({})) | length > 0
|
when: (gnome_sshd_settings_effective | default({})) | length > 0
|
||||||
|
|
||||||
- name: Restrict SSH login to allowed GNOME desktop users
|
- name: Restrict SSH login to allowed GNOME desktop users
|
||||||
tags: [services, gnome]
|
tags: [services, gnome]
|
||||||
|
|||||||
Reference in New Issue
Block a user