summaryrefslogtreecommitdiff
path: root/parts/users/seth/shell/default.nix
blob: 0b09bf696d43d1f9f3119fa362ce6d8ac5ac8674 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
  config,
  pkgs,
  ...
}: {
  imports = [
    ./bash.nix
    ./fish.nix
  ];

  programs = {
    bat = {
      enable = true;
      catppuccin.enable = true;
    };

    eza = {
      enable = true;
      enableAliases = true;
      icons = true;
    };

    starship = {
      enable = true;
      enableBashIntegration = false;
      enableZshIntegration = false;
      settings =
        {
          format = "$all";
          palette = "catppuccin_mocha";
          command_timeout = 250;
        }
        // fromTOML (builtins.readFile ./starship.toml)
        // fromTOML (builtins.readFile
          (pkgs.fetchFromGitHub {
              owner = "catppuccin";
              repo = "starship";
              rev = "5629d2356f62a9f2f8efad3ff37476c19969bd4f";
              hash = "sha256-nsRuxQFKbQkyEI4TXgvAjcroVdG+heKX5Pauq/4Ota0=";
            }
            + "/palettes/mocha.toml"));
    };
  };

  home = {
    sessionVariables = let
      inherit (config.xdg) configHome dataHome stateHome;
    in {
      EDITOR = "nvim";
      VISUAL = "$EDITOR";
      GPG_TTY = "$(tty)";
      CARGO_HOME = "${dataHome}/cargo";
      RUSTUP_HOME = "${dataHome}/rustup";
      LESSHISTFILE = "${stateHome}/less/history";
      NPM_CONFIG_USERCONFIG = "${configHome}/npm/npmrc";
    };

    shellAliases = {
      diff = "diff --color=auto";
      g = "git";
      gs = "g status";
    };
  };
}