mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 06:01:15 +00:00
a314814c19
This basic module allows you to specify the tmux configuration. As great as tmux is, some of the defaults are pretty awful, so having a way to specify the config really helps.
36 lines
635 B
Nix
36 lines
635 B
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
let
|
|
inherit (lib) mkOption mkEnableOption mkIf mkMerge types;
|
|
|
|
cfg = config.programs.tmux;
|
|
|
|
in
|
|
{
|
|
###### interface
|
|
|
|
options = {
|
|
programs.tmux = {
|
|
|
|
enable = mkEnableOption "<command>tmux</command> - a <command>screen</command> replacement.";
|
|
|
|
tmuxconf = mkOption {
|
|
default = "";
|
|
description = ''
|
|
The contents of /etc/tmux.conf
|
|
'';
|
|
type = types.lines;
|
|
};
|
|
};
|
|
};
|
|
|
|
###### implementation
|
|
|
|
config = mkIf cfg.enable {
|
|
environment = {
|
|
systemPackages = [ pkgs.tmux ];
|
|
etc."tmux.conf".text = cfg.tmuxconf;
|
|
};
|
|
};
|
|
}
|