bundles/users: deploy standard tmux config to /etc/tmux.conf instead of ~/.tmux.conf
This commit is contained in:
parent
eddb8ca70a
commit
0b51c9dae4
2 changed files with 13 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
||||||
unbind r
|
unbind r
|
||||||
# Reload with ctrl-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
|
bind C-a send-prefix # Pass on ctrl-a for other apps
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,11 @@ files['/etc/bash.bashrc'] = {
|
||||||
'content_type': 'mako',
|
'content_type': 'mako',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
files['/etc/tmux.conf'] = {
|
||||||
|
'source': 'tmux.conf',
|
||||||
|
'content_type': 'mako',
|
||||||
|
}
|
||||||
|
|
||||||
for username, attrs in node.metadata['users'].items():
|
for username, attrs in node.metadata['users'].items():
|
||||||
home = attrs.get('home', '/home/{}'.format(username))
|
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}
|
files[home + '/.ssh/authorized_keys'] = {'delete': True}
|
||||||
|
|
||||||
if exists(join(repo.path, 'data', 'users', 'files', 'tmux', '{}.conf'.format(username))):
|
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:
|
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))):
|
if exists(join(repo.path, 'data', 'users', 'files', 'fish', '{}.conf'.format(username))):
|
||||||
fish_src = 'fisk/{}.conf'.format(username)
|
fish_src = 'fisk/{}.conf'.format(username)
|
||||||
|
|
Loading…
Reference in a new issue