aboutsummaryrefslogtreecommitdiff
path: root/share/home/minimal.nix
blob: d22083e86ad4011f8ffe054aba34695c8d7ecbb6 (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
# This module contains a bunch of things that make up a minimal environment that
# I want on ALL of my machines.
{ pkgs, config, ... }: {
  imports = [ ./helix.nix ];

  home.packages = with pkgs; [
    curl
    git
    age
    gnupg
    ffmpeg
    imagemagick
    exiftool
    sl

    # Modern unix
    ripgrep # grep
    fd # find
    sd # sed
    dua # du
    jaq # json query tool

    git-annex
    git-remote-gcrypt

    # tools for dealing with all sorts archives
    atool
    unzip
    gnutar
    unrar-wrapper

    # Useful nix tooling
    nix-tree
  ];

  xdg.enable = true;

  home.shellAliases = {
    ip = ''ip --color=auto'';
    tempdir = "cd $(mktemp -d)";
    sl = "sl -awFc5";
  };

  # Lots of these are courtesy of xdg-ninja
  # https://github.com/b3nj5m1n/xdg-ninja
  #
  # Even though these tools may or may not be installed on any particular system
  # having these variables here is a preventative measure to make sure that
  # $HOME doesn't get polluted
  home.sessionVariables = with config.xdg; {
    CARGO_HOME = "${dataHome}/cargo";
    GOPATH = "${dataHome}/go";
    WINEPREFIX = "${dataHome}/wine";
    XCOMPOSECACHE = "${cacheHome}/X11/xcompose";
    GTK2_RC_FILES = "${configHome}/gtk-2.0/gtkrc";
    NODE_REPL_HISTORY = "${dataHome}/node_repl_history";
    NPM_CONFIG_USERCONFIG = "${configHome}/npm/npmrc";
    W3M_DIR = "${dataHome}/w3m";
    RENPY_PATH_TO_SAVES = "${dataHome}";
    PSQL_HISTORY = "${dataHome}/psql_history";
    _JAVA_OPTIONS = ''-Djava.util.prefs.userRoot=${configHome}/java'';
    OMNISHARPHOME = "${configHome}/omnisharp";
    DOTNET_CLI_HOME = "${dataHome}/dotnet";
    # shell
    HISTFILE = "${stateHome}/shell/history";
    ZDOTDIR = "${configHome}/zsh";
  };
}