Tmux: Difference between revisions
imported>Gkb m Replace outdated link with the updated one. |
imported>Crodjer The option is called `extraConfig` and not `extraTmuxConf` |
||
Line 11: | Line 11: | ||
enable = true; | enable = true; | ||
clock24 = true; | clock24 = true; | ||
extraConfig = '' # used for less common options, intelligently combines if defined in multiple places. | |||
... | ... | ||
''; | ''; | ||
Line 17: | Line 17: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Note that <code> | Note that <code>extraConfig</code> writes directly to <code>/etc/tmux.conf</code> | ||
There is a good example of [https://github.com/srid/nixos-config/blob/master/home/tmux.nix tmux configuration here]. | There is a good example of [https://github.com/srid/nixos-config/blob/master/home/tmux.nix tmux configuration here]. |
Revision as of 13:28, 15 May 2023
tmux is a "terminal multiplexer: it enables a number of terminals (or windows), each running a separate program, to be created, accessed, and controlled from a single screen. tmux may be detached from a screen and continue running in the background, then later reattached."
Global configuration
tmux can be configured globally from /etc/nixos/configuration.nix
.
As an example:
programs.tmux = {
enable = true;
clock24 = true;
extraConfig = '' # used for less common options, intelligently combines if defined in multiple places.
...
'';
}
Note that extraConfig
writes directly to /etc/tmux.conf
There is a good example of tmux configuration here.
Per-user configuration
However, if you want to configure per user, you could use Home Manager. This also grants you with more options available directly through nix, as opposed to through an extra config option. Though it should be noted that a few of the options have different names.