aboutsummaryrefslogtreecommitdiff
path: root/home-manager/tests/modules/programs/tmux/emacs-with-plugins.nix
blob: f9bccaa2ce499f58c7e647567245406d6366ae8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ config, lib, pkgs, ... }:

with lib;

{
  config = {
    programs.tmux = {
      aggressiveResize = true;
      clock24 = true;
      enable = true;
      keyMode = "emacs";
      newSession = true;
      reverseSplit = true;

      plugins = with pkgs.tmuxPlugins; [
        logging
        prefix-highlight
        fzf-tmux-url
      ];
    };

    nixpkgs.overlays = [
      (self: super: {
        tmuxPlugins = super.tmuxPlugins // {
          fzf-tmux-url = super.tmuxPlugins.fzf-tmux-url // {
            rtp = "@tmuxplugin_fzf_tmux_url_rtp@";
          };

          logging = super.tmuxPlugins.logging // {
            rtp = "@tmuxplugin_logging_rtp@";
          };

          prefix-highlight = super.tmuxPlugins.prefix-highlight // {
            rtp = "@tmuxplugin_prefix_highlight_rtp@";
          };

          sensible = super.tmuxPlugins.sensible // {
            rtp = "@tmuxplugin_sensible_rtp@";
          };
        };
      })
    ];

    nmt.script = ''
      assertFileExists home-files/.tmux.conf
      assertFileContent home-files/.tmux.conf ${./emacs-with-plugins.conf}
    '';
  };
}