{ config, lib, pkgs, hostName, ... }:
{
hardware.cpu.intel.updateMicrocode = true;
+hardware.opengl.extraPackages = [
+ pkgs.intel-media-driver # LIBVA_DRIVER_NAME=iHD
+ pkgs.vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
+ pkgs.vaapiVdpau
+ pkgs.libvdpau-va-gl
+];
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
services.thinkfan = {
enable = true;
- levels = ''
- (0, 0, 57)
- (1, 56, 62)
- (2, 61, 65)
- (3, 64, 66)
- (4, 65, 68)
- (5, 67, 71)
- (6, 70, 76)
- (7, 75, 81)
- (127, 80, 32767)
- '';
+ smartSupport = true;
+ levels = [
+ [0 0 57]
+ [1 56 60]
+ [2 59 63]
+ [3 62 65]
+ [4 64 67]
+ [5 66 72]
+ [6 71 78]
+ [7 77 82]
+ [127 81 32767]
+ ];
};
hardware.acpilight.enable = true;
services.acpid = {
event = "video/brightnessup.*";
action = "${pkgs.acpilight}/bin/xbacklight -inc 5";
};
- acAdapter = {
- event = "ac_adapter/*";
- action = ''
- vals=($1)
- case ''${vals[3]} in
- 00000000) # unplugged
- ${pkgs.linuxPackages.cpupower}/bin/cpupower frequency-set -g powersave;;
- 00000001) # plugged in
- ${pkgs.linuxPackages.cpupower}/bin/cpupower frequency-set -g ondemand;;
- esac
- '';
- };
};
+ acEventCommands = ''
+ vals=($1)
+ case ''${vals[3]} in
+ 00000000) # unplugged
+ ${pkgs.linuxPackages.cpupower}/bin/cpupower frequency-set -g powersave;;
+ 00000001) # plugged in
+ ${pkgs.linuxPackages.cpupower}/bin/cpupower frequency-set -g ondemand;;
+ esac
+ '';
};
# https://bugzilla.kernel.org/show_bug.cgi?id=110941
boot.kernelParams = [ "intel_pstate=no_hwp" ];
-boot.kernelModules = [ "kvm-intel" ];
+boot.kernelModules = [
+ "kvm-intel"
+];
boot.cleanTmpDir = true;
boot.tmpOnTmpfs = true;
boot.extraModulePackages = [
- config.boot.kernelPackages.exfat-nofuse
+ #config.boot.kernelPackages.exfat-nofuse
];
+/*
+boot.loader.efi = {
+ canTouchEfiVariables = true;
+ efiSysMountPoint = "/boot/efi";
+};
+*/
+# No pstore backend available on this system.
+systemd.services.mount-pstore.enable = false;
boot.loader.grub = {
enable = true;
version = 2;
device = "/dev/disk/by-id/ata-Samsung_SSD_850_PRO_128GB_S1SMNSAFC36436X";
configurationLimit = 3;
+
#zfsSupport = true;
- /*
- efiSupport = true;
- efi = {
- canTouchEfiVariables = false;
- efiSysMountPoint = "/boot/efi";
- };
- */
+ #efiSupport = true;
#enableCryptodisk = true;
};
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="none"
'';
-boot.supportedFilesystems = [ "zfs" ];
+boot.supportedFilesystems = [ "ntfs" "vfat" "zfs" ];
boot.initrd.supportedFilesystems = [ "zfs" ];
boot.initrd.availableKernelModules = [
"ahci"
boot.zfs.enableUnstable = false;
boot.zfs.requestEncryptionCredentials = [ hostName ];
services.zfs.autoScrub.enable = true;
-environment.systemPackages = [ pkgs.zfs ];
fileSystems."/" =
{ device = "${hostName}/root";