bundles/users: deploy standard tmux config to /etc/tmux.conf instead of ~/.tmux.conf

This commit is contained in:
Franzi 2020-03-28 13:01:30 +01:00
parent eddb8ca70a
commit 0b51c9dae4
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 13 additions and 7 deletions

View file

@ -1,6 +1,6 @@
unbind r
# Reload with ctrl-r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind r source-file /etc/tmux.conf \; source-file ~/.tmux.conf \; display "Reloaded!"
bind C-a send-prefix # Pass on ctrl-a for other apps

View file

@ -21,6 +21,11 @@ files['/etc/bash.bashrc'] = {
'content_type': 'mako',
}
files['/etc/tmux.conf'] = {
'source': 'tmux.conf',
'content_type': 'mako',
}
for username, attrs in node.metadata['users'].items():
home = attrs.get('home', '/home/{}'.format(username))
@ -54,14 +59,15 @@ for username, attrs in node.metadata['users'].items():
files[home + '/.ssh/authorized_keys'] = {'delete': True}
if exists(join(repo.path, 'data', 'users', 'files', 'tmux', '{}.conf'.format(username))):
tmux_src = 'tmux/{}.conf'.format(username)
files[home + '/.tmux.conf'] = {
'content_type': 'mako',
'source': 'tmux/{}.conf',
}
else:
tmux_src = 'tmux.conf'
files[home + '/.tmux.conf'] = {
'delete': True,
}
files[home + '/.tmux.conf'] = {
'content_type': 'mako',
'source': tmux_src,
}
if exists(join(repo.path, 'data', 'users', 'files', 'fish', '{}.conf'.format(username))):
fish_src = 'fisk/{}.conf'.format(username)