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

  settings = {
    git.pagers = [(lib.getExe pkgs.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 {
    files = {
      ".config/lazygit/config.yml" = {
        generator = lib.generators.toYAML {};
        value = settings;
      };
    };

    packages = [pkgs.lazygit];
  }