summaryrefslogtreecommitdiff
path: root/linux.nix
blob: 5934f7d97fb4d2d716ce7a00ab1a5a04c4b8f11a (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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
{ pkgs, ... }:

let
  solarized-xresources = ./xresources;
in
{
  imports = [ ./common.nix ./email.nix ];
  fonts.fontconfig.enableProfileFonts = true;

  xresources = {
    properties = {
      "XTerm*font" = "*-fixed-*-*-*-*-*";
      "XTerm*faceName" = "mononoki";
      "XTerm*faceSize" = "10";
      "XTerm*termName" = "xterm-256color";
      "XTerm*metaSendsEscape" = true;
    };
    extraConfig = builtins.readFile(solarized-xresources + "/Xresources.light");
  };

  services = {
    emacs.enable = true;
    network-manager-applet.enable = false;

    polybar = {
      enable = false;
      config = {
        "bar/top" = {
          font-0 = "mononoki:size-10";
          monitor = "\${env:MONITOR:eDP1}";
          monitor-fallback = "HDMI1";
          width = "100%";
          height = "2%";
          radius = 0;
          background = "#fdf6e3"; # solarized base3
          foreground = "#657b83"; # solarized base00
          tray-position = "right";
          tray-detached = false;
          tray-maxsize = 16;
          tray-transparent = false;
          tray-background = "#fdf6e3";
          tray-offset-x = 0;
          tray-offset-y = 0;
          tray-padding = 0;
          tray-scale = 1.0;
          module-margin = 4;
          modules-center = "date";
          modules-right = "battery";
        };
        "module/date" = {
          type = "internal/date";
          internal = 5;
          date = "%Y.%m.%d";
          time = "%H.%M";
          label = "%date%..%time%";
        };
        "module/battery" = {
          type = "internal/battery";
          battery = "BAT0";
          adapter = "AC";
          full-at = 99;
        };
        "module/ewmh" = {
          type = "internal/xworkspaces";
          pin-workspaces = true;
          enable-click = true;
          enable-scroll = false;
        };
      };
      script = ''
        #!/usr/bin/env sh
        systemctl --user daemon-reload
        polybar top &
      '';
    };

    taffybar = {
      enable = false;
    };

    redshift = {
      enable = true;
      latitude = "33.044444";
      longitude = "-117.271667";
      temperature = {
        day = 4000;
        night = 3500;
      };
    };

    gpg-agent = {
      enable = true;
      defaultCacheTtl = 72000;
      maxCacheTtl = 7200;
      enableSshSupport = true;
      verbose = true;
      extraConfig = ''
        allow-emacs-pinentry
        pinentry-program /home/ben/.nix-profile/bin/pinentry-tty
      '';
    };
  };

  xsession = {
    enable = false;
    windowManager = {
      xmonad = {
        enable = false;
        extraPackages = hpkgs: [
          hpkgs.xmonad-contrib
          hpkgs.xmonad-extras
          hpkgs.monad-logger
          hpkgs.taffybar
        ];
        enableContribAndExtras = true;
        config = ./xmonad.hs;
      };
    };
  };

  programs = {
    firefox = {
      enable = true;
    };
  };
}