Combine plainmacs and emacs roles.

This commit is contained in:
Tom Alexander
2023-07-11 00:54:51 -04:00
parent cb84d7d810
commit c1e3b8fc4e
18 changed files with 81 additions and 75 deletions

View File

@@ -1,9 +1,21 @@
- name: Install packages
when: 'emacs_flavor == "full"'
package:
name:
- aspell
state: present
- name: Install scripts
copy:
src: "files/{{ item.src }}"
dest: "{{ item.dest }}"
mode: 0755
owner: root
group: wheel
loop:
- src: plainmacs
dest: /usr/local/bin/plainmacs
- import_tasks: tasks/freebsd.yaml
when: 'os_flavor == "freebsd"'

View File

@@ -2,6 +2,12 @@
package:
name:
- emacs
state: present
- name: Install packages
when: 'emacs_flavor == "full"'
package:
name:
- py39-pygments
- inkscape # to support SVGs in LaTeX
# - prettier # typescript formatting

View File

@@ -1,7 +1,30 @@
- name: Build aur packages
register: buildaur
become_user: "{{ build_user.name }}"
command: "aurutils-sync --no-view {{ item }}"
args:
creates: "/var/cache/pacman/custom/{{ item }}-*.pkg.tar.*"
loop:
- emacs29-git
- name: Update cache
when: buildaur.changed
pacman:
name: []
state: present
update_cache: true
- name: Install packages
package:
name:
- aspell-en
- emacs29-git
state: present
- name: Install packages
when: 'emacs_flavor == "full"'
package:
name:
- prettier # typescript+yaml formatting
- pyright
- gopls

View File

@@ -12,6 +12,7 @@
- ".emacs.d/elisp"
- name: Configure dotfiles
when: 'emacs_flavor == "full"'
copy:
src: "files/{{ item.src }}"
dest: "{{ account_homedir.stdout }}/{{ item.dest }}"
@@ -22,7 +23,20 @@
- src: init.el
dest: .emacs.d/init.el
- name: Configure dotfiles
when: 'emacs_flavor == "plain"'
copy:
src: "files/{{ item.src }}"
dest: "{{ account_homedir.stdout }}/{{ item.dest }}"
mode: 0600
owner: "{{ account_name.stdout }}"
group: "{{ group_name.stdout }}"
loop:
- src: plainmacs_init.el
dest: .emacs.d/init.el
- name: Configure elisp files
when: 'emacs_flavor == "full"'
copy:
src: "files/{{ item }}"
dest: "{{ account_homedir.stdout }}/.emacs.d/elisp/{{ item }}"
@@ -58,7 +72,8 @@
owner: "{{ account_name.stdout }}"
group: "{{ group_name.stdout }}"
loop:
- emacs_e
- emacs_e # Create an alias 'e' which launches emacs
- plainmacs # Set the EDITOR to plainmacs
- import_tasks: tasks/peruser_freebsd.yaml
when: 'os_flavor == "freebsd"'