forked from baracoder/nix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.nix
265 lines (237 loc) · 6.12 KB
/
common.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
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
nix = {
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
'';
daemonIONiceLevel = 5;
daemonNiceLevel = 5;
trustedUsers = [ "root" "@wheel" ];
binaryCaches = [
"https://cache.nixos.org/"
"https://all-hies.cachix.org"
];
binaryCachePublicKeys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"all-hies.cachix.org-1:JjrzAOEUsD9ZMt8fdFbzo3jNAyEWlPAwdVuHw4RD43k="
];
gc = {
options = "--delete-older-than 30d";
};
};
nixpkgs.config.allowUnfree = true;
hardware.opengl.driSupport = true;
hardware.opengl.driSupport32Bit = true;
hardware.ksm.enable = true;
console.font = "Lat2-Terminus16";
console.keyMap = "us";
i18n.defaultLocale = "en_US.UTF-8";
time.timeZone = "Europe/Berlin";
fonts = {
enableDefaultFonts = true;
fontDir.enable = true;
enableGhostscriptFonts = true;
fontconfig = {
enable = true;
allowBitmaps = true;
};
fonts = with pkgs; [
terminus_font
terminus_font_ttf
corefonts
inconsolata
ubuntu_font_family
unifont
twemoji-color-font
];
};
hardware.pulseaudio = {
enable = true;
support32Bit = true;
package = pkgs.pulseaudioFull;
};
services = {
flatpak.enable = true;
avahi = {
enable = true;
nssmdns = true;
};
openssh.enable = true;
openssh.forwardX11 = true;
udisks2.enable = true;
printing.enable = true;
printing.drivers = with pkgs; [ gutenprint brlaser brgenml1lpr brgenml1cupswrapper (pkgs.callPackage ./brql.nix {}) ];
xserver =
let xkbVariant = "altgr-intl"; # no dead keys
xkbOptions = "eurosign:e,compose:menu,lv3:caps_switch";
in {
inherit xkbVariant xkbOptions;
enable = true;
layout = "us";
exportConfiguration = true;
displayManager = {
gdm = {
enable = true;
nvidiaWayland = false;
};
autoLogin = {
enable = false;
user = "bara";
};
};
desktopManager.gnome3 = {
enable = true;
extraGSettingsOverrides = ''
[org.gnome.desktop.input-sources]
sources=[('xkb', '${xkbVariant}')]
xkb-options=['${xkbOptions}']
'';
};
};
};
# Define a user account. Don't forget to set a password with ‘passwd’.
users.extraUsers.bara = {
isNormalUser = true;
uid = 1000;
group = "bara";
extraGroups = [ "dialout" "avahi" "users" "video" "wheel" "adm" "audio" "docker" "input" "vboxusers" "adbusers" "libvirtd" ];
createHome = true;
shell = pkgs.zsh;
};
users.extraGroups.bara.gid = 1000;
services.udev.packages = with pkgs; [
openhantek6022
];
environment.shells = with pkgs; [ bashInteractive zsh ];
environment.systemPackages = with pkgs; [
aspell
aspellDicts.de
aspellDicts.en
autojump
avahi
cifs-utils
curl
docker
dosfstools
espeak
evince
direnv
firefox
gimp
gitAndTools.gitFull
# broken again
#gnomeExtensions.system-monitor
gnumake
google-chrome
google-cloud-sdk
hdparm
htop
imagemagick
iotop
lm_sensors
meld
mtools
ntfs3g
nextcloud-client
openhantek6022
pamixer
pass
pavucontrol
python
renameutils
seafile-client
slack
source-code-pro
gnome3.gnome-boxes
spice-gtk
speechd
sshfsFuse
teamviewer
vlc
wget
zsh
samba
(callPackage ./vscode.nix {})
(callPackage ./dotnetSdk.nix {})
(mumble.override {
speechdSupport = true;
pulseSupport = true;
})
(nmap.override {
graphicalSupport = true;
})
(vim_configurable.customize {
name = "vim";
vimrcConfig.customRC = ''
syntax enable
set smartindent
set smartcase
set cursorline
set visualbell
set hlsearch
set incsearch
set ruler
set backspace=indent,eol,start
'';
vimrcConfig.vam.knownPlugins = pkgs.vimPlugins;
vimrcConfig.vam.pluginDictionaries = [
{ names = [
"vim-nix"
];}
];
})
# use version with seccomp fix
(proot.overrideAttrs (oldAttrs: {
src = fetchFromGitHub {
repo = "proot";
owner = "jorge-lip";
rev = "25e8461cbe56a3f035df145d9d762b65aa3eedb7";
sha256 = "1y4rlx0pzdg4xsjzrw0n5m6nwfmiiz87wq9vrm6cy8r89zambs7i";
};
version = "5.1.0.20171102";
}))
];
services.gvfs.enable = true;
services.fwupd.enable = true;
services.gnome3 = {
chrome-gnome-shell.enable = true;
gnome-keyring.enable = true;
gnome-online-accounts.enable = true;
gnome-online-miners.enable = true;
gnome-user-share.enable = true;
tracker-miners.enable = true;
tracker.enable = true;
sushi.enable = true;
};
services.earlyoom.enable = true;
programs.seahorse.enable = true;
programs.gnome-terminal.enable = true;
programs.gnome-disks.enable = true;
#services.teamviewer.enable = true;
# ram verdoppler
zramSwap.enable = false;
programs.adb.enable = true;
programs.bash.enableCompletion = true;
programs.zsh.enable = true;
#environment.etc."qemu/bridge.conf".text = ''
# allow bridge0
#'';
boot.kernelParams = [ "bluetooth.disable_ertm=1" ];
# raise limit to avoid steamplay problems
systemd.extraConfig = "DefaultLimitNOFILE=1048576";
programs.autojump.enable = true;
# directly run the missing commands via nix-shell (without installing anything)
programs.command-not-found.enable = true;
environment.variables.NIX_AUTO_RUN = "1";
hardware.bluetooth = {
enable = true;
package = pkgs.bluezFull;
};
#virtualisation.spiceUSBRedirection.enable = true;
security.wrappers.spice-client-glib-usb-acl-helper.source = "${pkgs.spice-gtk}/bin/spice-client-glib-usb-acl-helper";
nyris.programs.enable = true;
}