summaryrefslogtreecommitdiff
path: root/nixos/configuration.nix
blob: 4fa6e29dcdd95460d5d69f408fd6ce8716cf6c1f (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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
{ config, pkgs, hardware, hostname, ... }:

{
  hardware.bluetooth.enable = true;
  hardware.enableAllFirmware = true;
  hardware.pulseaudio = {
    enable = true;
    package = pkgs.pulseaudioFull;
    tcp.enable = true;
    tcp.anonymousClients.allowAll = true;
    zeroconf.discovery.enable = true;
    zeroconf.publish.enable = true;
  };

  boot.earlyVconsoleSetup = true;
  boot.cleanTmpDir = true;

  networking.networkmanager.enable = true;
  # networking.wireless.enable = true;
  networking.firewall.enable = true;
  networking.firewall.allowedUDPPorts = [1900];
  networking.firewall.allowedTCPPorts = [8080 18080];

  programs.zsh.enable = true;
  programs.fish.enable = true;

  # Set your time zone.
  time.timeZone = "America/New_York";

  # security.grsecurity.enable = true;
  # security.grsecurity.lockTunables = false;
  # # Needed when using chromium with grsecurity.
  # security.chromiumSuidSandbox.enable = true;

  nixpkgs.config.allowUnfree = true;

  fonts = {
    fonts = with pkgs; [
     fira-code 
    ];
  };

  # List packages installed in system profile. To search by name, run:
  # $ nix-env -qaP | grep wget
  environment.systemPackages = with pkgs;
  let
    myArduino = pkgs.stdenv.lib.overrideDerivation pkgs.arduino (o: {
      withGUI = true;
    });
    myWine = pkgs.wine.override { wineBuild = "wine32"; };
  in [
    neovim
    rustc
    fish
    git
    dmenu2 i3blocks i3status
    rsync
    chromium firefox
    xscreensaver xss-lock xorg.xev
    which htop tree
    myArduino
    termite
    nix-repl
    nfs-utils
    nox
    pasystray
    pavucontrol
    powertop
    # kde4.digikam
    emacs25
    sshfsFuse
    xorg.xbacklight
    rtorrent
    hdparm
    bwm_ng
    geeqie
    inkscape
    silver-searcher
    rofi
    wireshark
    trayer
    myWine
    iperf
    telnet
    pass
    rxvt_unicode-with-plugins
    xsel
    geeqie
    gnupg
    myWine
    mumble
    wdfs
    whois
    dhcpcd
    haskellPackages.idris

    dnsutils
    # fonts
    source-code-pro
    inconsolata
    wirelesstools
    xbindkeys
    imagemagick
    ghc
    net_snmp
    #rxvt-unicode-with-perl-with-unicode3-with-plugins
    unzip
    linssid
    nix-repl
    youtube-dl
    vlc
    unrar
    mosh
    tldr
    fira-code
    haskellPackages.hledger
    haskellPackages.hledger-ui
    haskellPackages.hledger-web
    haskellPackages.hledger-iadd
    moreutils
    ledger
    xorg.xhost
    binutils
    pandoc

    # (callPackage ./stardew-valley.nix {})    

    #temporary
    debootstrap
    wget

    # haskellPackages.xmonad
    # haskellPackages.xmonad-contrib
    haskellPackages.xmobar
  ];

  # List services that you want to enable:
  # Enable the OpenSSH daemon.
  # services.openssh.enable = true;
  services.avahi.enable = true;

  services.redshift = {
    enable = true;
    latitude = "40";
    longitude = "-74";
    extraOptions = ["-r"];
  };

  # Enable the X11 windowing system.
  services.xserver.displayManager.slim = {
    enable = true;
    autoLogin = true;
    defaultUser = "orbekk";
  };

  services.xserver.enable = true;
  services.xserver.windowManager.xmonad.enable = true;
  services.xserver.windowManager.xmonad.enableContribAndExtras = true;
  services.xserver.windowManager.xmonad.extraPackages = haskellPackages: [
      haskellPackages.xmobar ];
  services.xserver.desktopManager.xfce.enable = true;

  services.xserver.layout = "us";
  services.xserver.xkbVariant = "dvorak";

  i18n = {
    consoleFont = "ter-132n";
    consoleKeyMap = "dvorak";
    consolePackages = [ pkgs.terminus_font ];
  };

  services.cron.enable = true;
  services.xserver.synaptics = {
    enable = true;
    twoFingerScroll = true;
  };

  users = {
    defaultUserShell = "/run/current-system/sw/bin/fish";
    extraUsers.orbekk = {
      isNormalUser = true;
      home = "/home/orbekk";
      uid = 1000;
      description = "KJ";
      extraGroups = ["wheel" "networkmanager" "dialout" "uucp"];
      shell = "/run/current-system/sw/bin/fish";
    };
    extraUsers.guest = {
      isNormalUser = true;
      home = "/home/guest";
      uid = 10001;
      description = "Guest";
      extraGroups = ["networkmanager"];
    };
  };

  nix.maxJobs = 8;
  nix.buildCores = 0;  # as many as I have CPUs
  nix.useSandbox = true;
}