-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration.nix
269 lines (238 loc) · 5.25 KB
/
configuration.nix
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
{ config, pkgs, ... }:
{
imports = [
./hardware-configuration.nix
];
boot.kernelModules = [ "msr" "coretemp" "fuse" ];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
environment.pathsToLink = [ "/include" "/share" ];
environment.shellInit = ''
## GTK2 theme/icon
export GTK_PATH=$GTK_PATH:${pkgs.gtk-engine-murrine}/lib/gtk-2.0
export GTK2_RC_FILES=$GTK2_RC_FILES:${pkgs.writeText "iconrc" ''gtk-icon-theme-name="Numix Circle"''}:${pkgs.arc-theme}/share/themes/Arc/gtk-2.0/gtkrc
## GTK3 theme
export GTK_THEME="Arc"
## Rust
export RUST_SRC_PATH="${pkgs.rustPlatform.rust.rustc.src}/src"
'';
environment.systemPackages = with pkgs; [
### xorg
xorg.xmodmap
xcape
xclip
xdo
### gtk
gtk2
gtk3
gtk_engines
gtk-engine-murrine
hicolor_icon_theme
arc-theme
numix-icon-theme-circle
### android
androidenv.platformTools
gitRepo
### tools
## emacs
emacs
aspell
aspellDicts.en
yaskkserv
irony-server
ctags
rtags
## git
gitAndTools.gitFull
gitAndTools.tig
## mpd
mpc_cli
ncmpcpp
## download
curl
wget
aria2
megatools
## misc
asunder
bc
exfat
extundelete
feh
ffmpeg
file
firefoxWrapper
fuse
gucharmap
htop
id3v2
imagemagick
lsof
mcomix
mpv
nix-repl
nkf
p7zip
ranger
rofi
rxvt_unicode-with-plugins
screenfetch
scrot
silver-searcher
telnet
tree
unar
unrar
unzipNLS
vim
w3m
which
wrk
yabar
zip
### languages
## c/c++
llvmPackages.llvm
llvmPackages.clang
gnumake
cmake
bear
ccache
gdb
cpputest
## rust
rustPlatform.rust.rustc
rustPlatform.rust.cargo
rustracer
rustfmt
## python
(python34.buildEnv.override {
extraLibs = with python34Packages; [
ipython
jupyter
virtualenv
ipdb
coverage
flake8
jedi
epc
importmagic
yapf
];
ignoreCollisions = true;
})
];
fonts.fonts = with pkgs; [
anonymousPro
camingo-code
dejavu_fonts
font-awesome-ttf
inconsolata
source-code-pro
terminus_font
];
hardware.opengl.driSupport32Bit = true;
i18n.consoleFont = "lat9w-16";
i18n.consoleKeyMap = "us";
i18n.defaultLocale = "en_US.UTF-8";
i18n.inputMethod.enabled = "uim";
networking.firewall.allowedTCPPorts = [ 80 443 6600 8000 ];
networking.firewall.enable = false;
networking.hostName = "nixos";
networking.nameservers = [ "8.8.8.8" "8.8.4.4" ];
networking.networkmanager.enable = true;
networking.wireless.enable = false;
nix.binaryCaches = [ "https://cache.nixos.org" ];
nix.extraOptions = ''
auto-optimise-store = true
env-keep-derivations = true
gc-keep-outputs = true
gc-keep-derivations = true
'';
nix.nixPath = [
"nixpkgs=/etc/nixos/nixpkgs"
"nixos=/etc/nixos/nixpkgs/nixos"
"nixos-config=/etc/nixos/configuration.nix"
];
nix.useSandbox = true;
nixpkgs.config.allowBroken = true;
nixpkgs.config.allowUnfree = true;
nixpkgs.config.firefox.enableAdobeFlash = true;
nixpkgs.config.packageOverrides = pkgs: {
irony-server = pkgs.callPackage ./custom/irony-server { };
yaskkserv = pkgs.callPackage ./custom/yaskkserv { };
ncmpcpp = pkgs.ncmpcpp.override {
outputsSupport = true;
visualizerSupport = true;
clockSupport = true;
};
};
powerManagement.enable = true;
programs.bash.enableCompletion = true;
services.mpd.enable = true;
services.mpd.extraConfig = ''
audio_output {
type "alsa"
name "alsa_device"
format "44100:16:2"
mixer_type "software"
}
audio_output {
type "fifo"
name "my_fifo"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
audio_output {
type "httpd"
name "my_http_stream"
encoder "vorbis"
port "8000"
bitrate "128"
format "44100:16:1"
}
'';
services.mpd.group = "users";
services.mpd.user = "hyonhyoro";
services.mpd.musicDirectory = "/home/hyonhyoro/Music";
services.ntp.enable = true;
services.ntp.servers = [
"ntp.nict.jp"
"ntp1.jst.mfeed.ad.jp"
"ntp2.jst.mfeed.ad.jp"
"ntp3.jst.mfeed.ad.jp"
];
services.openssh.enable = true;
services.printing.enable = true;
services.udev.packages = [ pkgs.android-udev-rules ];
services.unclutter.enable = true;
services.xserver = {
enable = true;
autorun = true;
desktopManager.default = "none";
desktopManager.xterm.enable = false;
displayManager.lightdm.enable = true;
videoDrivers = [ "nvidia" ];
windowManager.bspwm.enable = true;
windowManager.default = "bspwm";
};
sound.enable = true;
sound.enableOSSEmulation = true;
sound.extraConfig = ''
pcm.dsp {
type plug
slave.pcm "dmix"
}
'';
time.timeZone = "Asia/Tokyo";
users.defaultUserShell = pkgs.bash;
users.extraUsers = {
hyonhyoro = {
uid = 1000;
isNormalUser = true;
createHome = true;
extraGroups = [ "audio" "fuse" "networkmanager" "wheel" ];
};
};
system.stateVersion = "17.03";
}