Add a copy of the emacs user service
This commit is contained in:
parent
b180a4760f
commit
d75a340aef
2 changed files with 18 additions and 10 deletions
17
roles/home-gui/files/emacs.service
Normal file
17
roles/home-gui/files/emacs.service
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
## If your Emacs is installed in a non-standard location, you may need
|
||||||
|
## to copy this file to a standard directory, eg ~/.config/systemd/user/ .
|
||||||
|
## If you install this file by hand, change the "Exec" lines below
|
||||||
|
## to use absolute file names for the executables.
|
||||||
|
[Unit]
|
||||||
|
Description=Emacs text editor
|
||||||
|
Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=emacs --fg-daemon
|
||||||
|
ExecStop=emacsclient --eval "(kill-emacs)"
|
||||||
|
Environment=SSH_AUTH_SOCK=%t/keyring/ssh
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
|
@ -3,20 +3,11 @@
|
||||||
git:
|
git:
|
||||||
repo: https://code.acperkins.com/acp/emacs.d.git
|
repo: https://code.acperkins.com/acp/emacs.d.git
|
||||||
dest: "{{ ansible_env.HOME }}/.emacs.d"
|
dest: "{{ ansible_env.HOME }}/.emacs.d"
|
||||||
- name: Find Emacs service definition
|
|
||||||
find:
|
|
||||||
paths: /usr/share/emacs
|
|
||||||
patterns: 'emacs.service'
|
|
||||||
recurse: yes
|
|
||||||
depth: 3
|
|
||||||
register: emacs_service_files
|
|
||||||
when: ansible_system == 'Linux'
|
|
||||||
- name: Create Emacs user service (Linux)
|
- name: Create Emacs user service (Linux)
|
||||||
copy:
|
copy:
|
||||||
src: '{{ item.path }}'
|
src: emacs.service
|
||||||
dest: "{{ ansible_env.HOME }}/.config/systemd/user/emacs.service"
|
dest: "{{ ansible_env.HOME }}/.config/systemd/user/emacs.service"
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
loop: '{{ emacs_service_files.files }}'
|
|
||||||
when: ansible_system == 'Linux'
|
when: ansible_system == 'Linux'
|
||||||
- name: Add Emacs server to autostart (FreeBSD)
|
- name: Add Emacs server to autostart (FreeBSD)
|
||||||
copy:
|
copy:
|
||||||
|
|
Loading…
Reference in a new issue