diff --git a/copy-root.sls b/copy-root.sls new file mode 100644 index 0000000..75d9a79 --- /dev/null +++ b/copy-root.sls @@ -0,0 +1,45 @@ +{# +SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. + +SPDX-License-Identifier: AGPL-3.0-or-later +#} + +{%- import "dom0/gui-user.jinja" as gui_user -%} + +"{{ slsdotpath }}-copy-root": + file.managed: + - name: /etc/profile.d/zzz-alias.sh + - source: salt://{{ slsdotpath }}/files/aliases/zzz-alias.sh + - mode: '0644' + - user: root + - group: root + +{% if grains['nodename'] != 'dom0' -%} + +"{{ slsdotpath }}-root-bashrc-dircolors": + file.replace: + - name: /root/.bashrc + - pattern: '^# eval ' + - repl: 'eval ' + +"{{ slsdotpath }}-root-bashrc-alias-ls": + file.replace: + - name: /root/.bashrc + - pattern: '^# alias ls=' + - repl: 'alias ls=' + +"{{ slsdotpath }}-root-bashrc-append": + file.append: + - require: + - file: "{{ slsdotpath }}-copy-root" + - name: /root/.bashrc + - text: "source /etc/profile.d/zzz-alias.sh" + +"{{ slsdotpath }}-user-bashrc-append": + file.append: + - require: + - file: "{{ slsdotpath }}-copy-root" + - name: /home/user/.bashrc + - text: "source /etc/profile.d/zzz-alias.sh" + +{% endif -%} diff --git a/copy-root.top b/copy-root.top new file mode 100644 index 0000000..955ff74 --- /dev/null +++ b/copy-root.top @@ -0,0 +1,9 @@ +{# +SPDX-FileCopyrightText: 2024 Blacky + +SPDX-License-Identifier: AGPL-3.0-or-later +#} + +base: + '*': + - dotfiles.copy-root diff --git a/files/aliases/zzz-alias.sh b/files/aliases/zzz-alias.sh new file mode 100644 index 0000000..202008d --- /dev/null +++ b/files/aliases/zzz-alias.sh @@ -0,0 +1,5 @@ +alias l='ls --color=auto -al' +alias ..='cd ..' +alias ...='cd ../..' +alias qusaltar='tar cvzf /Daten/donner0/qusal.tar.gz /srv/salt/qusal /root/*salt /etc/salt/minion.d/qusal.conf' +alias qusaluntar='tar xvzf /Daten/donner0/qusal.tar.gz -C /' diff --git a/files/sh/.config/sh/shrc b/files/sh/.config/sh/shrc index 62b7622..999358c 100644 --- a/files/sh/.config/sh/shrc +++ b/files/sh/.config/sh/shrc @@ -340,6 +340,10 @@ _fzf_comprun() { esac } +alias l='ls -al' +alias ..='cd ..' +alias ...='cd ../..' + ## }}} ## {{{ End ## Source local shell configuration file.