feat: allow absent dotfiles

Some files had a small impact such as Xft.dpi definition, thus removed.
Files with bigger impact were moved to root directories such as /etc or
were specified with full path such as ~/.local/bin.

In case the dotfiles configuration does extra things, such as verifying
merge commits, it was changed to code or comment when appropriate.

For: https://github.com/ben-grande/dotfiles/pull/1
This commit is contained in:
Ben Grande 2025-02-14 15:19:18 +01:00
parent 8609815f4e
commit 0e72ff8716
No known key found for this signature in database
GPG Key ID: 00C64E14F51F9E56
6 changed files with 13 additions and 34 deletions

View File

@ -1,5 +1,5 @@
{#
SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-FileCopyrightText: 2024 - 2025 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
@ -36,13 +36,4 @@ include:
- name: electrum --offline setconfig show_notes_tab true
- runas: user
"{{ slsdotpath }}-xprofile-to-increase-dpi":
file.managed:
- name: /home/user/.config/x11/xprofile.d/electrum.sh
- source: salt://{{ slsdotpath }}/files/client/xprofile.d/electrum.sh
- mode: '0755'
- user: user
- group: user
- makedirs: True
{% endif -%}

View File

@ -1,12 +0,0 @@
#!/bin/sh
## SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
##
## SPDX-License-Identifier: AGPL-3.0-or-later
current_dpi="$(xrdb -get Xft.dpi)"
wanted_dpi="144"
if test -z "${current_dpi}" || test "${current_dpi}" -lt "${wanted_dpi}"
then
printf '%s\n' "Xft.dpi: ${wanted_dpi}" | xrdb -override -
fi

View File

@ -14,15 +14,6 @@ include:
- dotfiles.copy-ssh
- dotfiles.copy-git
"{{ slsdotpath }}-opam-completion-and-hooks":
file.managed:
- name: /home/user/.config/sh/profile.d/opam.sh
- source: salt://{{ slsdotpath }}/files/client/profile/opam.sh
- mode: '0755'
- user: user
- group: user
- makedirs: True
"{{ slsdotpath }}-makedir-src":
file.directory:
- name: /home/user/src

View File

@ -1,5 +1,5 @@
{#
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-FileCopyrightText: 2023 - 2025 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
@ -42,4 +42,13 @@ include:
- opam
- ocaml
"{{ slsdotpath }}-opam-completion-and-hooks":
file.managed:
- name: /etc/profile.d/opam.sh
- source: salt://{{ slsdotpath }}/files/client/profile/opam.sh
- mode: '0755'
- user: root
- group: root
- makedirs: True
{% endif -%}

View File

@ -87,7 +87,7 @@ Pull `qubes-builderv2` commits:
```sh
cd ~/src/qubes-builderv2
git pull
git pull --verify-signatures
```
Initialize and merge submodules:

View File

@ -122,7 +122,7 @@ include:
cmd.run:
- require:
- cmd: "{{ slsdotpath }}-source-install-cfg_me"
- name: cfg_me -o /tmp/electrs.1 man
- name: /home/user/.local/bin/cfg_me -o /tmp/electrs.1 man
- cwd: /home/user/src/electrs
- runas: user