2018-01-04 01:28:44 +00:00
|
|
|
with import <stockholm/lib>;
|
2015-07-11 14:55:22 +00:00
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
imports = [
|
2015-10-29 00:09:54 +00:00
|
|
|
../smartd.nix
|
2018-01-04 01:28:44 +00:00
|
|
|
{
|
|
|
|
# nvidia doesn't build despite
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/33284
|
|
|
|
#hardware.bumblebee.enable = true;
|
|
|
|
#hardware.bumblebee.group = "video";
|
|
|
|
#hardware.enableRedistributableFirmware= true;
|
|
|
|
#krebs.nixpkgs.allowUnfreePredicate = pkg:
|
|
|
|
# hasPrefix "nvidia-x11-" pkg.name ||
|
|
|
|
# hasPrefix "nvidia-persistenced-" pkg.name ||
|
|
|
|
# hasPrefix "nvidia-settings-" pkg.name;
|
|
|
|
}
|
2015-07-11 14:55:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
boot.extraModprobeConfig = ''
|
|
|
|
options kvm_intel nested=1
|
|
|
|
'';
|
|
|
|
|
|
|
|
boot.initrd.availableKernelModules = [ "ahci" ];
|
|
|
|
boot.kernelModules = [ "kvm-intel" ];
|
|
|
|
|
2017-01-08 12:07:58 +00:00
|
|
|
boot.loader.systemd-boot.enable = true;
|
2015-07-11 14:55:22 +00:00
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
2018-01-04 01:28:44 +00:00
|
|
|
hardware.opengl.driSupport32Bit = true;
|
2017-01-08 12:07:58 +00:00
|
|
|
hardware.opengl.extraPackages = [ pkgs.vaapiIntel ];
|
|
|
|
|
2015-07-11 14:55:22 +00:00
|
|
|
networking.wireless.enable = true;
|
|
|
|
|
|
|
|
nix = {
|
|
|
|
buildCores = 4;
|
|
|
|
maxJobs = 4;
|
|
|
|
daemonIONiceLevel = 1;
|
|
|
|
daemonNiceLevel = 1;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.logind.extraConfig = ''
|
|
|
|
HandleHibernateKey=ignore
|
|
|
|
HandleLidSwitch=ignore
|
|
|
|
HandlePowerKey=ignore
|
|
|
|
HandleSuspendKey=ignore
|
|
|
|
'';
|
|
|
|
|
|
|
|
system.activationScripts.powertopTunables = ''
|
|
|
|
echo 1 > /sys/module/snd_hda_intel/parameters/power_save
|
|
|
|
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
|
|
|
|
(cd /sys/bus/pci/devices
|
|
|
|
for i in *; do
|
|
|
|
echo auto > $i/power/control # defaults to 'on'
|
|
|
|
done)
|
|
|
|
'';
|
2018-01-04 01:28:44 +00:00
|
|
|
|
|
|
|
services.xserver = {
|
|
|
|
videoDriver = "intel";
|
|
|
|
};
|
2015-07-11 14:55:22 +00:00
|
|
|
}
|