]> git.friedersdorff.com Git - max/saltfiles.git/commitdiff
Add aerc config
authorMaximilian Friedersdorff <max@friedersdorff.com>
Tue, 26 Nov 2019 08:38:36 +0000 (08:38 +0000)
committerMaximilian Friedersdorff <max@friedersdorff.com>
Tue, 26 Nov 2019 08:38:36 +0000 (08:38 +0000)
states/aerc/arch.sls [new file with mode: 0644]
states/aerc/files/accounts.jinja [new file with mode: 0644]
states/aerc/init.sls [new file with mode: 0644]
states/dotfiles.sls

diff --git a/states/aerc/arch.sls b/states/aerc/arch.sls
new file mode 100644 (file)
index 0000000..da2fe3b
--- /dev/null
@@ -0,0 +1,3 @@
+ensure aerc is installed:
+  pkg.installed:
+    - name: aerc-git
diff --git a/states/aerc/files/accounts.jinja b/states/aerc/files/accounts.jinja
new file mode 100644 (file)
index 0000000..f60d0b0
--- /dev/null
@@ -0,0 +1,9 @@
+{% set pword_cmd = "pass webmail.friedersdorff.com/max@friedersdorff.com | head -n 1" %}
+[Personal]
+source   = imaps://max%40friedersdorff.com@mail.friedersdorff.com
+source-cred-cmd = "{{ pword_cmd }}"
+outgoing = smtps+plain://max%40friedersdorff.com@mail.friedersdorff.com
+outgoing-cred-cmd = "{{ pword_cmd }}"
+default  = INBOX
+from     = Maximilian Friedersdorff <max@friedersdorff.com>
+copy-to  = Sent
diff --git a/states/aerc/init.sls b/states/aerc/init.sls
new file mode 100644 (file)
index 0000000..3598c5c
--- /dev/null
@@ -0,0 +1,23 @@
+include:
+  - aerc.{{ grains['os'] | lower}}
+
+ensure aerc config dir:
+  file.directory:
+    - name: {{ grains['homedir'] }}/.config/aerc
+    - user: {{ grains['user'] }}
+    - group: {{ grains['user'] }}
+    - dir_mode: 700
+    - file_mode: 600
+    - recurse:
+      - user
+      - group
+      - mode
+
+aerc config file:
+  file.managed:
+    - name: {{ grains['homedir'] }}/.config/aerc/accounts.conf 
+    - source: salt://aerc/files/accounts.jinja
+    - template: jinja
+    - user: {{ grains['user'] }}
+    - group: {{ grains['user'] }}
+    - mode: 600
index 3027027116220874b334693ea692b06ad31091b2..77e6662631bbf4c338d6fd10987b4fcf0508e1a5 100644 (file)
@@ -8,3 +8,4 @@ include:
   - termite
   - qutebrowser
   - tmux
+  - aerc