forked from shazow/nixfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
hive-zergling-x280.nix
140 lines (120 loc) · 3.87 KB
/
hive-zergling-x280.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
let
hashedPassword = import ./.hashedPassword.nix;
# Make with mkpasswd (see Makefile)
in { config, pkgs, lib, ... }:
{
services.localtime.enable = true;
time.timeZone = "America/Toronto";
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" ];
boot.blacklistedKernelModules = [ "mei_me" ];
#options iwlwifi power_save=1 d0i3_disable=0 uapsd_disable=0
#options i915 fastboot=0 enable_rc6=1 modeset=1 enable_fbc=1 enable_guc_loading=1 enable_guc_submission=1 enable_huc=1 enable_psr=1 disable_power_well=0 semaphores=1 nuclear_pageflip=1 enable_gvt=0 enable_psr=2
#options intel_iommu off
#options intel_idle max_cstate=1
boot.extraModprobeConfig = ''
options iwldvm force_cam=0
options cfg80211 ieee80211_regdom=US
options snd_hda_intel power_save=1 power_save_controller=Y
'';
hardware.enableRedistributableFirmware = true;
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = false;
hardware.opengl.extraPackages = with pkgs; [
vaapiIntel
libvdpau-va-gl
vaapiVdpau
intel-ocl
intel-media-driver
];
hardware.opengl.driSupport32Bit = true;
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ];
hardware.pulseaudio.support32Bit = true;
nix.maxJobs = lib.mkDefault 8;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
nixpkgs.config.allowUnfree = true;
imports = [
./hardware/thinkpad-x280.nix
./hardware/boot-x280.nix
./common/base-system.nix
./common/desktop-i3.nix
./common/yubikey.nix
./common/hivemind.nix
];
networking.hostName = "zergling";
networking.networkmanager.wifi.macAddress =
"preserve"; # Or "random", "stable", "permanent", "00:11:22:33:44:55"
networking.networkmanager.wifi.powersave = false;
networking.networkmanager.enable = true;
networking.networkmanager.appendNameservers = [ "192.168.199.133" ];
networking.firewall.enable = false;
#127.0.0.1 es-dev.precisionnutrition.com
networking.extraHosts = ''
127.0.0.1 local_rails
'';
services.usbmuxd.enable = true;
services.printing.enable = true;
services.avahi.enable = true;
services.avahi.nssmdns = true;
nix.trustedUsers = [ "root" "ghedamat" ];
users.users.ghedamat = {
isNormalUser = true;
home = "/home/ghedamat";
description = "ghedamat";
extraGroups = [
"wheel"
"sudoers"
"audio"
"video"
"disk"
"networkmanager"
"plugdev"
"adbusers"
"docker"
];
uid = 1000;
hashedPassword = hashedPassword;
shell = pkgs.zsh;
};
services.logind.extraConfig = ''
RuntimeDirectorySize=7.8G
'';
# zsh stuff
programs.zsh.enable = true;
programs.zsh.enableCompletion = true;
programs.zsh.promptInit = ""; # Clear this to avoid a conflict with oh-my-zsh
programs.autojump.enable = true;
# hivemind modules
hivemind.dev = {
enable = true;
docker = true;
};
hivemind.zsa.enable = true;
hivemind.tailscale.enable = true;
hivemind.nas-mount.enable = true;
services.accounts-daemon.enable = true;
## stuff to move
services.redshift.enable = true;
services.redshift.provider = "geoclue2";
services.openssh.enable = true;
services.openssh.permitRootLogin = "yes";
# temporary config
environment.systemPackages = with pkgs; [
direnv
nix-direnv
steam
cachix
libimobiledevice
];
# nix options for derivations to persist garbage collection
nix.extraOptions = ''
keep-outputs = true
keep-derivations = true
'';
environment.pathsToLink = [ "/share/nix-direnv" ];
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you
# should.
system.stateVersion = "19.03"; # Did you read the comment?
}