qusal/salt/dom0/dotfiles.sls
Ben Grande 5722a25779
fix: discover non-root username at runtime
Useful when Dom0 has the non-default username, less useful for DomUs.

Fixes: https://github.com/ben-grande/qusal/issues/43
2024-04-30 16:04:40 +02:00

24 lines
585 B
Plaintext

{#
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
{% if grains['nodename'] == 'dom0' -%}
{%- import slsdotpath ~ "/gui-user.jinja" as gui_user -%}
include:
- dotfiles.copy-all
"{{ slsdotpath }}-xprofile-sourcer":
file.managed:
- name: {{ gui_user.gui_user_home }}/.config/autostart/xprofile.desktop
- source: salt://{{ slsdotpath }}/files/autostart/xprofile.desktop
- user: {{ gui_user.gui_user }}
- group: {{ gui_user.gui_user }}
- mode: '0644'
- makedirs: True
{% endif -%}