about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorjoachifm <joachifm@users.noreply.github.com>2016-03-29 20:26:42 +0000
committerjoachifm <joachifm@users.noreply.github.com>2016-03-29 20:26:42 +0000
commitf807cce1eb2bc3e8c35a55d77f3007397cd9747c (patch)
treeb1be70362c15dcab7064972ce5d0e7392e19ce07 /nixos
parent0ca288abc80752e2216afa2790d2bb92a5a38ef8 (diff)
parenta314814c19fa9744ee3f3c333a1c00b27574b90e (diff)
downloadnixlib-f807cce1eb2bc3e8c35a55d77f3007397cd9747c.tar
nixlib-f807cce1eb2bc3e8c35a55d77f3007397cd9747c.tar.gz
nixlib-f807cce1eb2bc3e8c35a55d77f3007397cd9747c.tar.bz2
nixlib-f807cce1eb2bc3e8c35a55d77f3007397cd9747c.tar.lz
nixlib-f807cce1eb2bc3e8c35a55d77f3007397cd9747c.tar.xz
nixlib-f807cce1eb2bc3e8c35a55d77f3007397cd9747c.tar.zst
nixlib-f807cce1eb2bc3e8c35a55d77f3007397cd9747c.zip
Merge pull request #14175 from peterhoeg/tmux
tmux nixos module: add nixos program module for tmux
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/module-list.nix1
-rw-r--r--nixos/modules/programs/tmux.nix35
2 files changed, 36 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index d317333f9631..483444fe55f3 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -77,6 +77,7 @@
   ./programs/shell.nix
   ./programs/ssh.nix
   ./programs/ssmtp.nix
+  ./programs/tmux.nix
   ./programs/venus.nix
   ./programs/wvdial.nix
   ./programs/xfs_quota.nix
diff --git a/nixos/modules/programs/tmux.nix b/nixos/modules/programs/tmux.nix
new file mode 100644
index 000000000000..4220a2e17b3f
--- /dev/null
+++ b/nixos/modules/programs/tmux.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;
+    };
+  };
+}