summaryrefslogtreecommitdiff
path: root/darwin.nix
blob: 8d3496ce35564d0c69c4fd4cc7687cf2cffc8a58 (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
{ pkgs, ... }:

let
  homedir = builtins.getEnv "HOME";
  gitCommitTemplate = ./lib/git-commit-template;
  gpgid = "D09299626FA78AF8";
in
{
  imports = [
    ./lib/common.nix
    ./lib/email.nix
  ];
  home = {
    sessionVariables.PATH = "/usr/local/opt/mysql@5.7/bin:${homedir}/bin:${homedir}/.cabal/bin:${homedir}/.local/bin:$PATH";
    packages = with pkgs; [
      muchsync
      hledger-web
      hledger-ui
      (haskellPackages.ghcWithPackages (ps: with ps; [hledger]))
      coreutils
    ];
  };

  programs = {

    git = {
      enable = true;
      userName  = "Ben Sima";
      userEmail = "ben@bsima.me";
      ignores = [ "*~" "*.swp" ];
      package = pkgs.gitAndTools.gitFull;
      signing = {
        key = gpgid;
        signByDefault = false;
      };
      aliases = {
        authors = "shortlog -s -n";
      };
      extraConfig = ''
        [push]
        default = simple

        [commit]
        template = ${gitCommitTemplate}

        [sendemail]
        smtpuser = ben@bsima.me
        smptserverport = 587
        smptserver = mail.bsima.me
        chainreplyto = false
        composeencoding = UTF-8
      '';
    };

    # Doesnt' work bc clang can't compile it??
    #qutebrowser = {
    #  enable = true;
    #  settings = {
    #    "colors.webpage.darkmode.enabled" = true;
    #  };
    #};

    emacs = {
      enable = true;
      extraPackages = epkgs: import ./lib/emacs-packages.nix { inherit epkgs; };
    };
  };
}