summary refs log tree commit diff
path: root/modules/home/common.nix
blob: 52cdf1124ff8876c77440cec8a0aa5445e8b354d (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
{ ... }:

{
  imports = [
    ../foundation/home

    ./shell.nix
    ./code.nix
    ./zed.nix
  ];

  programs = {
    git = {
      enable = true;
      userName = "Mel";
      userEmail = "mel@rnrd.eu";
      signing = {
        key = "D75A C286 ACA7 00B4 D8EC 377D 2082 F8EC 11CC 009B";
        signByDefault = true;
      };
      ignores = [
        # ignore most vim swap-files
        "*~"
        "[._]*.sw?"
      ];
      aliases = {
        "skip" = "update-index --skip-worktree";
        "unskip" = "update-index --no-skip-worktree";
      };

      extraConfig.init.defaultBranch = "main";
    };

    direnv = {
      enable = true;
      nix-direnv.enable = true;
    };
  };

  xdg.configFile = {
    # home-manager does not have the option to pass an alacritty
    # config file directly.
    "alacritty/alacritty.toml".source = ../../configs/alacritty.toml;
  };

  home.file = {
    # base .vimrc for tools outside of vim, like the
    # VSCode Vim plugin.
    ".vimrc".source = ../../configs/.vimrc;

    # special .vimrc for the IdeaVim plugin in JetBrains IDEs.
    # `source`s the normal ~/.vimrc and enables IdeaVim-specfic plugins.
    ".ideavimrc".source = ../../configs/.ideavimrc;
  };

  home.sessionPath = [
    "$HOME/.local/share/JetBrains/Toolbox/scripts"
  ];
}