-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.nix
246 lines (209 loc) · 5.49 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
{ config, ... }:
#{ ... }: {
let
#sources = import ../nix/sources.nix;
#pkgs = import sources.nixpkgs { };
pkgs = import <nixpkgs> {};
lib = pkgs.lib;
#config = pkgs.config;
in
{
imports = [
./hardware-configuration.nix
];
# More hardware configuration #
boot.loader.grub = {
efiSupport = true;
#efiInstallAsRemovable = true;
device = "nodev"; # No MBR installation
};
fileSystems."/boot" = { device = "/dev/disk/by-uuid/70D6-1701"; fsType = "vfat"; };
boot.initrd.kernelModules = [ "nvme" ];
boot.kernelModules = [ "kvm-intel" "wl" "nvme" ];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
# file:///mnt2/old-root/etc/fstab , https://github.com/tudurom/dotfiles/blob/df86674e0b4cd33a889e6cd8182af605887b86f6/machines/anton/hardware.nix
fileSystems."/" = { device = "/dev/disk/by-uuid/d04c775a-e47f-4008-b5d4-11ac81c343b3"; fsType = "btrfs"; options = [ "defaults" "compress=zstd" "subvol=@" "noatime" ]; };
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/d04c775a-e47f-4008-b5d4-11ac81c343b3";
fsType = "btrfs";
options = [ "defaults" "subvol=@home" "noatime" ];
};
# https://discourse.nixos.org/t/wrong-swap-partition-detected-by-nixos-generate-config-on-fresh-install/5355
swapDevices =
[ {
device = "/dev/disk/by-uuid/c4aa5d0f-fe56-4cae-90ce-563fcd3364d4"; }
];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
# high-resolution display
hardware.video.hidpi.enable = lib.mkDefault true;
# #
#boot.cleanTmpDir = true;
networking.hostName = "MacBookPro";
#networking.firewall.allowPing = true;
#services.openssh.enable = true;
#users.users.root.openssh.authorizedKeys.keys = [
# ""
#];
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound.
sound.enable = true;
hardware.pulseaudio.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
services.xserver.libinput.enable = true;
nix = {
trustedUsers = [ "root" "sebastian" ];
};
# Define a user account. Don't forget to set a password with `passwd`.
users = {
users.sebastian = {
#shell = pkgs.bash;
#useDefaultShell = false;
isNormalUser = true;
home = "/home/sebastian";
description = "Sebastian";
extraGroups = [ "wheel" "networkmanager" ]; # Enable `sudo` for the user.
};
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
emacs
vim
git
wget
curl
xclip
dmidecode
pciutils usbutils
wirelesstools
networkmanager
ungoogled-chromium
htop
glances
xorg.xbacklight
xorg.xrandr
brightnessctl
#steam
#steam-run
glxinfo
xfce.xfce4-whiskermenu-plugin
redshift
xfce.xfce4panel
ntfs3g
ispell
xfce.xfce4-pulseaudio-plugin
gcc
gnome.gnome-keyring
tldr
zip
unzip
direnv
tmux
xfce.thunar-archive-plugin
lm_sensors
# TEMP, since nix-shell requires sudo currently to work, else an error like "nix opening lock file readonly file system" happens #
gdb
# #
lsof
usbmuxd
libimobiledevice
# temp #
python38
python38Packages.dbus-python
which
wpa_supplicant_gui
netcat-gnu
telnet
sox
mplayer
audacity
#realvnc-vnc-viewer
#tightvnc
gparted
ddrescue
ddrescueview
];
#programs.steam.enable = true;
hardware.opengl = {
enable = true;
driSupport32Bit = true;
};
hardware.pulseaudio.support32Bit = true; # https://jtojnar.github.io/dumpling/
#boot.kernelModules = [ "wl" ];
boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
nixpkgs.config.allowUnfree = true;
#nixpkgs.config.allowUnfreePredicate = pkg:
# builtins.elem (lib.getName pkg) [
# "broadcom-sta"
# "facetimehd-firmware"
# "steam"
# "steam-original"
# "steam-runtime"
# ];
boot.loader.systemd-boot.enable = false; #boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# https://github.com/siraben/dotfiles/blob/master/nixos/configuration.nix #
time.timeZone = "America/Chicago";
#networking.hostId = //TODO: unique ID?
networking.networkmanager.enable = true;
networking.nameservers = [ "1.0.0.1" "1.1.1.1" ];
fonts = {
fontDir.enable = true;
enableGhostscriptFonts = true;
fonts = with pkgs; [
emojione
noto-fonts
noto-fonts-cjk
noto-fonts-extra
inconsolata
material-icons
liberation_ttf
dejavu_fonts
terminus_font
siji
unifont
];
fontconfig.defaultFonts = {
monospace = [
"Hack" #"DejaVu Sans Mono"
];
sansSerif = [
"DejaVu Sans"
"Noto Sans"
];
serif = [
"DejaVu Serif"
"Noto Serif"
];
};
};
# Etc #
environment.pathsToLink = [ "libexec" ];
services.xserver = {
enable = true;
desktopManager = {
#default = "xfce";
xterm.enable = false;
xfce = {
enable = true;
noDesktop = true;
enableXfwm = false;
};
};
displayManager = {
defaultSession = "xfce+i3";
#defaultSession = "none+i3";
};
windowManager.i3 = {
enable = true;
extraPackages = with pkgs; [
dmenu
i3status
#i3lock
i3blocks
];
};
};
system.stateVersion = "20.09";
}