paulbsd-salt/states/kitty/config.sls
2023-01-04 23:36:21 +01:00

25 lines
610 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
kitty-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 %}