Differentiate machines via env variables

This commit is contained in:
2019-04-16 20:23:23 +02:00
parent 75143ed841
commit 60b2a0952c
4 changed files with 23 additions and 3 deletions

View File

@@ -18,3 +18,8 @@ screen:
0: eDP-1
workspace:
environment:
MACHINE_HAS_KEEPASSX: 0
MACHINE_HAS_NEXTCLOUD: 1
MACHINE_HAS_GDRIVE_BACKUP: 0

View File

@@ -26,3 +26,8 @@ workspace:
8: pass
9: music
10: pim
environment:
MACHINE_HAS_KEEPASSX: 1
MACHINE_HAS_NEXTCLOUD: 0
MACHINE_HAS_GDRIVE_BACKUP: 0

View File

@@ -107,10 +107,16 @@ run pasystray pasystray
run redshift redshift-gtk -b 1 -l "$redshift_lat_long" -t "$redshift_colortemp"
run keepassx keepassx --keyfile ~/.secret/main.key ~/.secret/main.kdbx
if [[ "${MACHINE_HAS_KEEPASSX}" ]] ; then
run keepassx keepassx --keyfile ~/.secret/main.key ~/.secret/main.kdbx
fi
run spotify spotify
run nextcloud nextcloud
if [[ "${MACHINE_HAS_NEXTCLOUD}" ]] ; then
run nextcloud nextcloud
fi
[[ -x ~/bin/gdrive-backup ]] && schedule backup "Mon..Fri 12:00:00" ~/bin/gdrive-backup
if [[ "${MACHINE_HAS_GDRIVE_BACKUP}" ]] ; then
[[ -x ~/bin/gdrive-backup ]] && schedule backup "Mon..Fri 12:00:00" ~/bin/gdrive-backup
fi

View File

@@ -53,3 +53,7 @@ if [[ -z $DISPLAY ]] ; then
tmux new-session -A -s tmux-tty-$XDG_VTNR
fi
fi
{% for k, v in machine.environment.items() %}
{{ k }}="{{ v }}"
{% endfor %}