This repository has no description
702 B
29 lines
1{ self, ... }:
2{
3 perSystem =
4 { pkgs, ... }:
5 let
6 tmuxConfigText = ''
7 set-option -g default-terminal screen-256color
8
9 # Auto-destroy sessions when no clients attached (handles terminal close)
10 set -g destroy-unattached on
11 '';
12 tmuxConfigFile = pkgs.writeText "tmux.conf" tmuxConfigText;
13 in
14 {
15 packages.tmux =
16 (self.wrapLib.makeWrapper {
17 pkgs = pkgs;
18 package = pkgs.tmux;
19 flags = {
20 "-f" = tmuxConfigFile;
21 };
22 }).overrideAttrs
23 (old: {
24 passthru = (old.passthru or { }) // {
25 tmuxConfig = tmuxConfigText;
26 };
27 });
28 };
29}