Starting an emacs role.
This commit is contained in:
parent
a8c0374828
commit
a5261c1704
@ -19,3 +19,4 @@
|
|||||||
- fonts
|
- fonts
|
||||||
- alacritty
|
- alacritty
|
||||||
- sway
|
- sway
|
||||||
|
- emacs
|
||||||
|
22
ansible/roles/emacs/files/plainmacs
Executable file
22
ansible/roles/emacs/files/plainmacs
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
|
||||||
|
exec emacs -q --eval "(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)))" "${@}"
|
5
ansible/roles/emacs/meta/main.yaml
Normal file
5
ansible/roles/emacs/meta/main.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
dependencies:
|
||||||
|
- users
|
||||||
|
- fonts
|
||||||
|
# - rust
|
||||||
|
# - plainmacs
|
25
ansible/roles/emacs/tasks/common.yaml
Normal file
25
ansible/roles/emacs/tasks/common.yaml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
- 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
|
23
ansible/roles/emacs/tasks/freebsd.yaml
Normal file
23
ansible/roles/emacs/tasks/freebsd.yaml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
- name: Install packages
|
||||||
|
package:
|
||||||
|
name:
|
||||||
|
- emacs
|
||||||
|
- texlive-full
|
||||||
|
- py39-pygments
|
||||||
|
- inkscape # to support SVGs in LaTeX
|
||||||
|
# - prettier # typescript formatting
|
||||||
|
- aspell
|
||||||
|
- en-aspell
|
||||||
|
- unzip # for extracting mspyls
|
||||||
|
- py39-isort
|
||||||
|
- py39-black
|
||||||
|
- zip # for odt export from org-mode
|
||||||
|
- gnuplot # used for exporting graphs from org-mode
|
||||||
|
- graphviz # used for exporting graphviz dot charts from org-mode
|
||||||
|
# - pyright
|
||||||
|
- sqlite3 # for sqlite code blocks in org-mode
|
||||||
|
# - terraform-ls # Terraform language server
|
||||||
|
- py39-ptvsd
|
||||||
|
- hs-ShellCheck
|
||||||
|
# - gopls
|
||||||
|
state: present
|
6
ansible/roles/emacs/tasks/linux.yaml
Normal file
6
ansible/roles/emacs/tasks/linux.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# - name: Install packages
|
||||||
|
# pacman:
|
||||||
|
# name:
|
||||||
|
# - foo
|
||||||
|
# state: present
|
||||||
|
# update_cache: true
|
1
ansible/roles/emacs/tasks/main.yaml
Normal file
1
ansible/roles/emacs/tasks/main.yaml
Normal file
@ -0,0 +1 @@
|
|||||||
|
- import_tasks: tasks/common.yaml
|
29
ansible/roles/emacs/tasks/peruser.yaml
Normal file
29
ansible/roles/emacs/tasks/peruser.yaml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
- include_role:
|
||||||
|
name: per_user
|
||||||
|
|
||||||
|
# - name: Create directories
|
||||||
|
# file:
|
||||||
|
# name: "{{ account_homedir.stdout }}/{{ item }}"
|
||||||
|
# state: directory
|
||||||
|
# mode: 0700
|
||||||
|
# owner: "{{ account_name.stdout }}"
|
||||||
|
# group: "{{ group_name.stdout }}"
|
||||||
|
# loop:
|
||||||
|
# - ".config/foo"
|
||||||
|
|
||||||
|
# - name: Copy files
|
||||||
|
# copy:
|
||||||
|
# src: "files/{{ item.src }}"
|
||||||
|
# dest: "{{ account_homedir.stdout }}/{{ item.dest }}"
|
||||||
|
# mode: 0600
|
||||||
|
# owner: "{{ account_name.stdout }}"
|
||||||
|
# group: "{{ group_name.stdout }}"
|
||||||
|
# loop:
|
||||||
|
# - src: foo.conf
|
||||||
|
# dest: .config/foo/foo.conf
|
||||||
|
|
||||||
|
- import_tasks: tasks/peruser_freebsd.yaml
|
||||||
|
when: 'os_flavor == "freebsd"'
|
||||||
|
|
||||||
|
- import_tasks: tasks/peruser_linux.yaml
|
||||||
|
when: 'os_flavor == "linux"'
|
0
ansible/roles/emacs/tasks/peruser_freebsd.yaml
Normal file
0
ansible/roles/emacs/tasks/peruser_freebsd.yaml
Normal file
0
ansible/roles/emacs/tasks/peruser_linux.yaml
Normal file
0
ansible/roles/emacs/tasks/peruser_linux.yaml
Normal file
Loading…
x
Reference in New Issue
Block a user