about summary refs log tree commit diff
path: root/home.nix
blob: 236091cb019dfd4fb7f0982212f4357bbf91d367 (plain) (blame)
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
# home-manager configuration used on ChromeOS systems

{ config, pkgs, ... }:

{
  # Allow non-free software (fonts, IDEA, etc.):
  nixpkgs.config.allowUnfree = true;

  # Install various useful packages:
  home.packages = with pkgs; [
    bat
    exa
    gnupg
    google-cloud-sdk
    htop
    pass
    ripgrep
    tdesktop
    transmission
    tree

    # Fonts to make available in X11 applications:
    input-fonts

    # Emacs configuration stays in the normal ~/.emacs.d location (for
    # now), hence this package is not installed via `programs.emacs`.
    (import ./emacs.nix { inherit pkgs; })
  ];

  programs.git = {
    enable = true;
    userEmail = "mail@tazj.in";
    userName = "Vincent Ambo";
  };

  services.gpg-agent = {
    enable = true;
    extraConfig = ''
      pinentry-program ${pkgs.pinentry}/bin/pinentry-gtk-2
      allow-emacs-pinentry
    '';
  };

  # Let Home Manager install and manage itself.
  programs.home-manager.enable = true;
  manual.html.enable = true;

  # Shell configuration
  #
  # There are some differences between the ChromeOS / NixOS
  # configurations, so instead of fixing up the dotfile to support
  # both I opted for keeping the configuration here.
  programs.fish = {
    enable = true;
    interactiveShellInit = ''
      # Configure classic prompt
      set fish_color_user --bold blue
      set fish_color_cwd --bold white

      # Enable colour hints in VCS prompt:
      set __fish_git_prompt_showcolorhints yes
      set __fish_git_prompt_color_prefix purple
      set __fish_git_prompt_color_suffix purple

      # Fish configuration
      set fish_greeting ""

      # Fix up nix-env & friends for Nix 2.0
      export NIX_REMOTE=daemon
    '';
  };

  # Ensure fonts installed via Nix are picked up.
  fonts.fontconfig.enableProfileFonts = true;
}