summary refs log tree commit diff stats
path: root/user/settings/base.nix
blob: 692369e4dd2c8307f3444ef413b22ab1fb9b0042 (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
{
  config,
  lib,
  pkgs,
  ...
}: {
  # Let Home Manager install and manage itself.
  programs.home-manager.enable = true;
  manual = {
    html.enable = true;
  };
  programs.neovim = {
    enable = true;
    vimAlias = true;
    vimdiffAlias = true;
    withNodeJs = true;
    plugins = with pkgs.vimPlugins; [
      commentary
      coc-css
      coc-git
      coc-html
      coc-json
      coc-tabnine
      coc-yaml
      conjure
      vim-surround
      vim-nix
      zig-vim
    ];
    extraLuaConfig = builtins.readFile ../nvim/init.lua;
    coc = {
      enable = true;
      settings = {
        "json.enable" = true;
        "suggest.enablePreview" = true;
        languageserver = {
          nix = {
            command = "${pkgs.nil}/bin/nil";
            filetypes = [ "nix" ];
          };
        };
      };
    };
  };
  home.sessionVariables = {
    EMAIL = "alan@alanpearce.eu";
    XDG_CACHE_HOME =
      if pkgs.stdenv.isDarwin
      then "$HOME/Library/Caches/XDG"
      else "$HOME/.cache";
    XDG_CONFIG_HOME = "$HOME/.config";
    XDG_DATA_HOME = "$HOME/.local/share";
  };

  programs.zsh.shellAliases = {
    make = "${pkgs.remake}/bin/remake";
  };
  programs.htop = {
    enable = true;
    settings = {
      header_margin = 0;
      tree_view = 1;
      hide_kernel_threads = 1;
      hide_userland_threads = 1;
    };
  };
  home.packages = with pkgs;
    [
      pv
      fd
      sd
      entr
      ripgrep
      iftop
      nmap
      moreutils
      mtr
      tree
      abduco
      dvtm
      vimv
      (aspellWithDicts (d: [ d.en d.en-computers d.en-science d.de ]))
    ]
    ++ (
      if !stdenv.isDarwin
      then [
        file
        ldns
        lsof
        unar
        zip
      ]
      else [
      ]
    );
}