paulbsd-salt/states/kitty/config.sls
2022-12-03 00:10:55 +01:00

25 lines
612 B
Plaintext

---
{%- from "kitty/map.jinja" import users with context %}
{%- for name, user in users.items() %}
{%- if user.enabled %}
kitty-config-dir-{{ name }}:
file.directory:
- name: {{ user.home }}/.config/kitty
- user: {{ name }}
- group: {{ user.gid }}
- mode: 0755
kittyrc-user-{{ name }}:
file.managed:
- name: {{ user.home }}/.config/kitty/kitty.conf
- source: salt://kitty/kitty.conf.j2
- user: {{ name }}
- group: {{ user.gid }}
- mode: 0644
- template: jinja
- require:
- pkg: kitty-pkg
- file: kitty-config-dir-{{ name }}
{%- endif %}
{%- endfor %}