aboutsummaryrefslogtreecommitdiff
path: root/modules/terminal/system/programs/lazygit.nix
blob: e3e2b42640be39b4fddd29d0cdb36695e4dcc6aa (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
{
  pkgs,
  config,
  lib,
  ...
}: let
  cfg = config.collinux.terminal.programs.lazygit;

  settings = {
    git.paging.pager = "${pkgs.diff-so-fancy}/bin/diff-so-fancy";
    gui = {
      showRandomTip = false;
      commitLength.show = false;
      showListFooter = false;
      showCommandLog = false;
      showPanelJumps = false;
      statusPanelView = "allBranchesLog";
    };
    update.method = "never";
    notARepository = "quit";

    quitOnTopLevelReturn = true;
    disableStartupPopups = true;
    promptToReturnFromSubprocess = false;

    theme.inactiveBorderColor = ["#313244"];
    theme.activeBorderColor = ["#89b4fa"];
  };
in
  lib.mkIf cfg.enable {
    hjem.users."${config.collinux.user.name}" = {
      files = {
        ".config/lazygit/config.yml" = {
          generator = lib.generators.toYAML {};
          value = settings;
        };
      };

      packages = [pkgs.lazygit];
    };
  }