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;
|
2019-09-04 18:17:56 +00:00
|
|
|
#krebs.nixpkgs.allowUnfreePredicate = pkg: any (eq (packageName pkg)) [
|
|
|
|
# "nvidia-x11"
|
|
|
|
# "nvidia-persistenced"
|
|
|
|
# "nvidia-settings"
|
|
|
|
#];
|
2018-01-04 01:28:44 +00:00
|
|
|
}
|
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;
|
|
|
|
|
2021-03-07 20:04:47 +00:00
|
|
|
hardware.enableRedistributableFirmware = 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";
|
|
|
|
};
|
2021-02-15 13:00:47 +00:00
|
|
|
|
|
|
|
tv.hw.screens.primary.width = 1366;
|
|
|
|
tv.hw.screens.primary.height = 768;
|
2015-07-11 14:55:22 +00:00
|
|
|
}
|