mirror of
https://github.com/fscotto/infra.git
synced 2026-05-31 15:59:56 +00:00
Remove Arch/nymph path, restore nymph as Void desktop
Delete all Arch-specific files (packages_arch role, profile_desktop_gnome role, arch.yml group_vars, nymph.yml host_vars, arch dotfiles). Revert nymph to the void group in inventory, remove the arch play from site.yml, and restore profile_desktop_host/tasks/nymph.yml to its pre-Arch state (GRUB + NVIDIA + prime-run). Preserve Void improvements introduced alongside Arch work (desktop_void_dotfiles, desktop_void_source_tools, profile_desktop_i3 dir additions, void-specific conditions). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
---
|
||||
- name: Synchronize and upgrade Arch Linux packages
|
||||
tags: [packages]
|
||||
community.general.pacman:
|
||||
update_cache: true
|
||||
upgrade: true
|
||||
|
||||
- name: Install packages on Arch Linux
|
||||
tags: [packages]
|
||||
community.general.pacman:
|
||||
name: >-
|
||||
{{
|
||||
(
|
||||
(common_packages | default([]))
|
||||
+ (arch_packages_base | default([]))
|
||||
+ (arch_desktop_common_packages | default([]))
|
||||
+ (
|
||||
(arch_desktop_gnome_packages | default([]))
|
||||
if 'gnome' in (desktop_sessions_enabled | default([]))
|
||||
else []
|
||||
)
|
||||
+ (arch_profile_packages | default([]))
|
||||
+ (host_packages | default([]))
|
||||
)
|
||||
| unique
|
||||
}}
|
||||
state: present
|
||||
@@ -272,37 +272,10 @@
|
||||
{{
|
||||
(desktop_common_dotfiles | default([]))
|
||||
+ ((desktop_void_dotfiles | default([])) if 'void' in group_names else [])
|
||||
+ ((desktop_arch_dotfiles | default([])) if 'arch' in group_names else [])
|
||||
}}
|
||||
loop_control:
|
||||
label: "{{ item.dest }}"
|
||||
|
||||
- name: Ensure systemd user enablement directory exists
|
||||
tags: [services, dotfiles, dotfiles:desktop]
|
||||
ansible.builtin.file:
|
||||
path: "{{ user_home }}/.config/systemd/user/default.target.wants"
|
||||
state: directory
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "0755"
|
||||
when:
|
||||
- "'arch' in group_names"
|
||||
- (desktop_systemd_user_services | default([])) | length > 0
|
||||
|
||||
- name: Enable desktop systemd user services
|
||||
tags: [services, dotfiles, dotfiles:desktop]
|
||||
ansible.builtin.file:
|
||||
src: "{{ user_home }}/.config/systemd/user/{{ item }}"
|
||||
dest: "{{ user_home }}/.config/systemd/user/default.target.wants/{{ item }}"
|
||||
state: link
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
force: true
|
||||
loop: "{{ desktop_systemd_user_services | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item }}"
|
||||
when: "'arch' in group_names"
|
||||
|
||||
- name: Copy Emacs desktop dotfiles
|
||||
tags: [dotfiles, dotfiles:desktop, emacs]
|
||||
ansible.builtin.copy:
|
||||
@@ -499,27 +472,14 @@
|
||||
path: "{{ user_home }}/.cargo/bin/rustc"
|
||||
register: rustup_initialized
|
||||
|
||||
- name: Run rustup-init with cargo env sourced (Void)
|
||||
- name: Run rustup-init with cargo env sourced
|
||||
ansible.builtin.shell:
|
||||
cmd: . ~/.cargo/env && rustup-init -y --no-modify-path
|
||||
creates: "{{ user_home }}/.cargo/bin/rustc"
|
||||
become_user: "{{ username }}"
|
||||
environment:
|
||||
HOME: "{{ user_home }}"
|
||||
when:
|
||||
- not rustup_initialized.stat.exists
|
||||
- "'void' in group_names"
|
||||
|
||||
- name: Install Rust stable toolchain via rustup (Arch)
|
||||
ansible.builtin.command:
|
||||
cmd: rustup toolchain install stable
|
||||
creates: "{{ user_home }}/.cargo/bin/rustc"
|
||||
become_user: "{{ username }}"
|
||||
environment:
|
||||
HOME: "{{ user_home }}"
|
||||
when:
|
||||
- not rustup_initialized.stat.exists
|
||||
- "'arch' in group_names"
|
||||
when: not rustup_initialized.stat.exists
|
||||
|
||||
- name: Ensure cargo env is sourced in shell profile
|
||||
ansible.builtin.lineinfile:
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
---
|
||||
- name: Ensure GNOME desktop session is enabled for this profile
|
||||
tags: [gnome]
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- "'gnome' in (desktop_sessions_enabled | default([]))"
|
||||
fail_msg: >-
|
||||
profile_desktop_gnome requires desktop_sessions_enabled to include gnome.
|
||||
|
||||
- name: Ensure systemd boots to the graphical target
|
||||
tags: [services, gnome]
|
||||
ansible.builtin.file:
|
||||
src: /usr/lib/systemd/system/graphical.target
|
||||
dest: /etc/systemd/system/default.target
|
||||
state: link
|
||||
force: true
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
- name: Enable emacs user service from package
|
||||
tags: [services, emacs]
|
||||
ansible.builtin.systemd:
|
||||
name: emacs.service
|
||||
enabled: true
|
||||
scope: user
|
||||
become_user: "{{ username }}"
|
||||
|
||||
- name: Deploy gpg-agent.conf for GNOME (pinentry-gnome3, no ssh-support)
|
||||
tags: [dotfiles, dotfiles:desktop, gnome]
|
||||
ansible.builtin.copy:
|
||||
src: "{{ playbook_dir }}/../dotfiles/desktop/.gnupg/gpg-agent.arch.conf"
|
||||
dest: "{{ user_home }}/.gnupg/gpg-agent.conf"
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "0600"
|
||||
|
||||
- name: Enable gnome-keyring PAM auth hook for GDM
|
||||
tags: [gnome]
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/pam.d/gdm-password
|
||||
insertafter: '^auth\s+include\s+system-local-login$'
|
||||
line: "auth optional pam_gnome_keyring.so"
|
||||
state: present
|
||||
|
||||
- name: Enable gnome-keyring PAM session hook for GDM
|
||||
tags: [gnome]
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/pam.d/gdm-password
|
||||
insertafter: '^session\s+include\s+system-local-login$'
|
||||
line: "session optional pam_gnome_keyring.so auto_start"
|
||||
state: present
|
||||
|
||||
- name: Enable gnome-keyring PAM password hook for GDM
|
||||
tags: [gnome]
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/pam.d/gdm-password
|
||||
insertafter: '^password\s+include\s+system-local-login$'
|
||||
line: "password optional pam_gnome_keyring.so use_authtok"
|
||||
state: present
|
||||
@@ -1,75 +1,16 @@
|
||||
---
|
||||
- name: Ensure systemd-boot loader entries directory exists
|
||||
- name: Configure GRUB kernel parameters for NVIDIA hybrid graphics
|
||||
tags: [packages, nvidia]
|
||||
ansible.builtin.file:
|
||||
path: "{{ host_systemd_boot_esp_path }}/loader/entries"
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0755"
|
||||
when: host_systemd_boot_esp_path is defined
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/default/grub
|
||||
regexp: '^GRUB_CMDLINE_LINUX='
|
||||
line: 'GRUB_CMDLINE_LINUX="rd.luks.uuid=1e15d159-5d05-4a1f-9639-ac200dff9f9c rootflags=subvol=@ apparmor=1 security=apparmor nouveau.modeset=0 nvidia-drm.modeset=1"'
|
||||
state: present
|
||||
|
||||
- name: Check whether systemd-boot is installed
|
||||
- name: Regenerate GRUB configuration
|
||||
tags: [packages, nvidia]
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- bootctl
|
||||
- "--esp-path={{ host_systemd_boot_esp_path }}"
|
||||
- is-installed
|
||||
register: nymph_systemd_boot_state
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
when:
|
||||
- host_systemd_boot_esp_path is defined
|
||||
- not ansible_check_mode
|
||||
|
||||
- name: Install systemd-boot
|
||||
tags: [packages, nvidia]
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- bootctl
|
||||
- "--esp-path={{ host_systemd_boot_esp_path }}"
|
||||
- install
|
||||
ansible.builtin.command: grub-mkconfig -o /boot/grub/grub.cfg
|
||||
changed_when: true
|
||||
when:
|
||||
- host_systemd_boot_esp_path is defined
|
||||
- not ansible_check_mode
|
||||
- nymph_systemd_boot_state.rc | default(1) != 0
|
||||
|
||||
- name: Configure systemd-boot loader defaults
|
||||
tags: [packages, nvidia]
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ host_systemd_boot_esp_path }}/loader/loader.conf"
|
||||
content: |
|
||||
default {{ host_systemd_boot_default }}
|
||||
timeout {{ host_systemd_boot_timeout | default(3) }}
|
||||
console-mode {{ host_systemd_boot_console_mode | default('max') }}
|
||||
editor {{ 'yes' if host_systemd_boot_editor | default(false) else 'no' }}
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
when:
|
||||
- host_systemd_boot_esp_path is defined
|
||||
- host_systemd_boot_default is defined
|
||||
|
||||
- name: Configure systemd-boot Arch entries
|
||||
tags: [packages, nvidia]
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ host_systemd_boot_esp_path }}/loader/entries/{{ item.filename }}"
|
||||
content: |-
|
||||
title {{ item.title }}
|
||||
linux {{ item.linux }}
|
||||
{% for initrd in item.initrds | default([]) %}
|
||||
initrd {{ initrd }}
|
||||
{% endfor %}
|
||||
options {{ item.options }}
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
loop: "{{ host_systemd_boot_entries | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item.filename }}"
|
||||
when: host_systemd_boot_esp_path is defined
|
||||
|
||||
- name: Configure NVIDIA power management for hybrid graphics
|
||||
tags: [packages, nvidia]
|
||||
|
||||
@@ -19,11 +19,3 @@
|
||||
loop_control:
|
||||
label: "{{ item }}"
|
||||
|
||||
- name: Enable systemd services without starting them
|
||||
tags: [services, packages]
|
||||
ansible.builtin.systemd:
|
||||
name: "{{ item }}"
|
||||
enabled: true
|
||||
loop: "{{ enabled_services_only | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item }}"
|
||||
|
||||
Reference in New Issue
Block a user