Merge pull request #14175 from peterhoeg/tmux
tmux nixos module: add nixos program module for tmux
This commit is contained in:
commit
f807cce1eb
|
@ -77,6 +77,7 @@
|
||||||
./programs/shell.nix
|
./programs/shell.nix
|
||||||
./programs/ssh.nix
|
./programs/ssh.nix
|
||||||
./programs/ssmtp.nix
|
./programs/ssmtp.nix
|
||||||
|
./programs/tmux.nix
|
||||||
./programs/venus.nix
|
./programs/venus.nix
|
||||||
./programs/wvdial.nix
|
./programs/wvdial.nix
|
||||||
./programs/xfs_quota.nix
|
./programs/xfs_quota.nix
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
{ 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue