Combine plainmacs and emacs roles.
This commit is contained in:
parent
cb84d7d810
commit
c1e3b8fc4e
@ -1,2 +1,3 @@
|
|||||||
timezone: "America/New_York"
|
timezone: "America/New_York"
|
||||||
install_bluetooth: true
|
install_bluetooth: true
|
||||||
|
emacs_flavor: "full"
|
||||||
|
@ -91,7 +91,7 @@
|
|||||||
- jail
|
- jail
|
||||||
- bhyve
|
- bhyve
|
||||||
- wireguard
|
- wireguard
|
||||||
- emacs
|
# - emacs
|
||||||
- mrmanager
|
- mrmanager
|
||||||
|
|
||||||
- hosts: admin_git:public_dns
|
- hosts: admin_git:public_dns
|
||||||
|
1
ansible/roles/emacs/defaults/main.yaml
Normal file
1
ansible/roles/emacs/defaults/main.yaml
Normal file
@ -0,0 +1 @@
|
|||||||
|
emacs_flavor: "plain" # or full for systems where I do real development.
|
19
ansible/roles/emacs/files/plainmacs_init.el
Normal file
19
ansible/roles/emacs/files/plainmacs_init.el
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
(progn
|
||||||
|
(setq make-backup-files nil auto-save-default nil create-lockfiles nil)
|
||||||
|
(load-theme 'tango-dark t)
|
||||||
|
(set-face-attribute 'default nil :background "black")
|
||||||
|
;; Bright yellow highlighting for selected region
|
||||||
|
(set-face-attribute 'region nil :background "#ffff50" :foreground "black")
|
||||||
|
;; Bright green cursor to distinguish from yellow region
|
||||||
|
(set-cursor-color "#ccff66")
|
||||||
|
;; Hightlight the current line
|
||||||
|
(set-face-attribute 'line-number-current-line nil :foreground "white")
|
||||||
|
;; Set default font
|
||||||
|
(set-face-attribute 'default nil :height 100 :width 'regular :weight 'regular :family "Cascadia Mono")
|
||||||
|
;; Set fallback font for unicode glyphs
|
||||||
|
(set-fontset-font "fontset-default" nil (font-spec :name "Noto Color Emoji"))
|
||||||
|
(menu-bar-mode -1)
|
||||||
|
(when (fboundp 'tool-bar-mode)
|
||||||
|
(tool-bar-mode -1))
|
||||||
|
(when ( fboundp 'scroll-bar-mode)
|
||||||
|
(scroll-bar-mode -1)))
|
@ -1,5 +1,5 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- users
|
- users
|
||||||
- fonts
|
- fonts
|
||||||
- rust
|
- role: rust
|
||||||
- plainmacs
|
when: 'emacs_flavor == "full"'
|
||||||
|
@ -1,9 +1,21 @@
|
|||||||
- name: Install packages
|
- name: Install packages
|
||||||
|
when: 'emacs_flavor == "full"'
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- aspell
|
- aspell
|
||||||
state: present
|
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
|
- import_tasks: tasks/freebsd.yaml
|
||||||
when: 'os_flavor == "freebsd"'
|
when: 'os_flavor == "freebsd"'
|
||||||
|
|
||||||
|
@ -2,6 +2,12 @@
|
|||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- emacs
|
- emacs
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Install packages
|
||||||
|
when: 'emacs_flavor == "full"'
|
||||||
|
package:
|
||||||
|
name:
|
||||||
- py39-pygments
|
- py39-pygments
|
||||||
- inkscape # to support SVGs in LaTeX
|
- inkscape # to support SVGs in LaTeX
|
||||||
# - prettier # typescript formatting
|
# - prettier # typescript formatting
|
||||||
|
@ -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
|
- name: Install packages
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- aspell-en
|
- aspell-en
|
||||||
|
- emacs29-git
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Install packages
|
||||||
|
when: 'emacs_flavor == "full"'
|
||||||
|
package:
|
||||||
|
name:
|
||||||
- prettier # typescript+yaml formatting
|
- prettier # typescript+yaml formatting
|
||||||
- pyright
|
- pyright
|
||||||
- gopls
|
- gopls
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
- ".emacs.d/elisp"
|
- ".emacs.d/elisp"
|
||||||
|
|
||||||
- name: Configure dotfiles
|
- name: Configure dotfiles
|
||||||
|
when: 'emacs_flavor == "full"'
|
||||||
copy:
|
copy:
|
||||||
src: "files/{{ item.src }}"
|
src: "files/{{ item.src }}"
|
||||||
dest: "{{ account_homedir.stdout }}/{{ item.dest }}"
|
dest: "{{ account_homedir.stdout }}/{{ item.dest }}"
|
||||||
@ -22,7 +23,20 @@
|
|||||||
- src: init.el
|
- src: init.el
|
||||||
dest: .emacs.d/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
|
- name: Configure elisp files
|
||||||
|
when: 'emacs_flavor == "full"'
|
||||||
copy:
|
copy:
|
||||||
src: "files/{{ item }}"
|
src: "files/{{ item }}"
|
||||||
dest: "{{ account_homedir.stdout }}/.emacs.d/elisp/{{ item }}"
|
dest: "{{ account_homedir.stdout }}/.emacs.d/elisp/{{ item }}"
|
||||||
@ -58,7 +72,8 @@
|
|||||||
owner: "{{ account_name.stdout }}"
|
owner: "{{ account_name.stdout }}"
|
||||||
group: "{{ group_name.stdout }}"
|
group: "{{ group_name.stdout }}"
|
||||||
loop:
|
loop:
|
||||||
- emacs_e
|
- emacs_e # Create an alias 'e' which launches emacs
|
||||||
|
- plainmacs # Set the EDITOR to plainmacs
|
||||||
|
|
||||||
- import_tasks: tasks/peruser_freebsd.yaml
|
- import_tasks: tasks/peruser_freebsd.yaml
|
||||||
when: 'os_flavor == "freebsd"'
|
when: 'os_flavor == "freebsd"'
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
- 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"'
|
|
||||||
|
|
||||||
- import_tasks: tasks/linux.yaml
|
|
||||||
when: 'os_flavor == "linux"'
|
|
||||||
|
|
||||||
- include_tasks:
|
|
||||||
file: tasks/peruser.yaml
|
|
||||||
apply:
|
|
||||||
become: yes
|
|
||||||
become_user: "{{ initialize_user }}"
|
|
||||||
loop: "{{ users | dict2items | community.general.json_query('[?value.initialize==`true`].key') }}"
|
|
||||||
loop_control:
|
|
||||||
loop_var: initialize_user
|
|
@ -1,5 +0,0 @@
|
|||||||
- name: Install packages
|
|
||||||
package:
|
|
||||||
name:
|
|
||||||
- emacs
|
|
||||||
state: present
|
|
@ -1,22 +0,0 @@
|
|||||||
- 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
|
|
@ -1 +0,0 @@
|
|||||||
- import_tasks: tasks/common.yaml
|
|
@ -1,18 +0,0 @@
|
|||||||
- include_role:
|
|
||||||
name: per_user
|
|
||||||
|
|
||||||
- name: Configure zshrc additional imports
|
|
||||||
copy:
|
|
||||||
src: "files/zshrc_{{ item }}"
|
|
||||||
dest: "{{ account_homedir.stdout }}/.config/ansible_deploy/zshrc/{{ item }}.zsh"
|
|
||||||
mode: 0600
|
|
||||||
owner: "{{ account_name.stdout }}"
|
|
||||||
group: "{{ group_name.stdout }}"
|
|
||||||
loop:
|
|
||||||
- plainmacs
|
|
||||||
|
|
||||||
- import_tasks: tasks/peruser_freebsd.yaml
|
|
||||||
when: 'os_flavor == "freebsd"'
|
|
||||||
|
|
||||||
- import_tasks: tasks/peruser_linux.yaml
|
|
||||||
when: 'os_flavor == "linux"'
|
|
Loading…
Reference in New Issue
Block a user