aboutsummaryrefslogtreecommitdiff
path: root/home-manager/tests/modules/programs/tmux/emacs-with-plugins.nix
blob: 5e147b7290e0c1cb6344b4b4ebc2a04d0b88351a (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
{ config, lib, pkgs, ... }:

with lib;

let

  substituteExpected = path: pkgs.substituteAll {
    src = path;

    tmuxplugin_fzf_tmux_url = pkgs.tmuxPlugins.fzf-tmux-url;
    tmuxplugin_logging = pkgs.tmuxPlugins.logging;
    tmuxplugin_prefix_highlight = pkgs.tmuxPlugins.prefix-highlight;
    tmuxplugin_sensible_rtp = pkgs.tmuxPlugins.sensible.rtp;
  };

in

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

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