Starting an emacs role.

This commit is contained in:
Tom Alexander 2022-10-19 22:52:45 -04:00
parent a8c0374828
commit a5261c1704
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
10 changed files with 112 additions and 0 deletions

View File

@ -19,3 +19,4 @@
- fonts
- alacritty
- sway
- emacs

View 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)))" "${@}"

View File

@ -0,0 +1,5 @@
dependencies:
- users
- fonts
# - rust
# - plainmacs

View 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

View 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

View File

@ -0,0 +1,6 @@
# - name: Install packages
# pacman:
# name:
# - foo
# state: present
# update_cache: true

View File

@ -0,0 +1 @@
- import_tasks: tasks/common.yaml

View 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"'