Tmux: Difference between revisions
imported>Srid Actually this is home-manager |
imported>Srid update link to example |
||
Line 18: | Line 18: | ||
Note that <code>extraTmuxConf</code> writes directly to <code>/etc/tmux.conf</code> | Note that <code>extraTmuxConf</code> writes directly to <code>/etc/tmux.conf</code> | ||
Example: https://github.com/srid/nix-config/blob/master/nixos/tmux.nix | |||
== Per-user configuration == | == 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. | 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. | ||
== See also == | == See also == |
Revision as of 19:05, 16 December 2020
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;
extraTmuxConf = '' # used for less common options, intelligently combines if defined in multiple places.
...
'';
}
Note that extraTmuxConf
writes directly to /etc/tmux.conf
Example: https://github.com/srid/nix-config/blob/master/nixos/tmux.nix
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.