summary refs log blame commit diff
path: root/nixos/modules/programs/tmux.nix
blob: 4220a2e17b3fd596571b9b2d584d4372ad13254c (plain) (tree)


































                                                                                                   
{ 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;
    };
  };
}