dotfiles/physical/xps9360.nix

94 lines
3 KiB
Nix
Raw Normal View History

# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }:
{
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
2017-02-02 18:58:13 +01:00
../modules/linux-nvme.nix
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.blacklistedKernelModules = ["psmouse"];
linux_nvme = {
2017-04-08 23:20:11 +02:00
basekpkgs = pkgs.linuxPackages_testing;
gofaster = true;
nvmepatch = true;
};
# boot.kernelPackages = pkgs.linuxPackagesFor ((pkgs.linux_testing.override {
# argsOverride = {
# version = "4.11.0-drm";
# modDirVersion = "4.11.0-rc1";
# src = pkgs.fetchgit {
# url = "git://anongit.freedesktop.org/drm-intel";
# rev = "1d1c80ec6d4d6ac72aa80920d5290776f3c81a86";
# sha256 = "1879cgzag8072rp99prhm3nqaf90z63j74p7si931bvz4qj4z7s0";
# };
# };
# }).overrideDerivation (attr: {enableParallelBuilding = true;}));
2017-02-02 16:31:19 +01:00
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
hardware.cpu.intel.updateMicrocode = true;
2017-01-26 14:52:06 +01:00
services.xserver.libinput.enable = true;
services.thermald.enable = true;
networking.wireless.enable = true;
2017-04-28 18:09:28 +02:00
networking.useNetworkd = true;
hardware.bluetooth.enable = true;
# https://wiki.archlinux.org/index.php/Dell_XPS_13_(9360)#Module-based_Powersaving_Options
# might require linux 4.11
boot.kernelParams = ["i915.enable_fbc=1" "i915.enable_guc_loading=1" "i915.enable_guc_submission=1" "i915.enable_huc=1" "i915.enable_psr=2"];
# now we wait until enable_psr=1 is fixed
fileSystems."/" =
{ device = "/dev/disk/by-uuid/a751e4ea-f1aa-48e1-9cbe-423878e29b62";
fsType = "btrfs";
options = ["defaults" "relatime" "discard"];
};
boot.initrd.luks.devices."nix-crypt" = {
device = "/dev/disk/by-uuid/320ef81d-283f-4916-ac26-ecfb0f31e549";
allowDiscards = true;
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/0E07-7805";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/d9c4c15b-0e9c-47f6-8675-93b1b8de5f9d"; }
];
nix.maxJobs = lib.mkDefault 4;
2017-02-02 16:31:19 +01:00
environment.systemPackages = [pkgs.btrfs-progs];
# ideal... doesn't work.
#services.udev.extraRules = ''
# KERNEL=="intel_backlight", SUBSYSTEM=="backlight", MODE="666"
#'';
# for now
systemd.services."display-manager".preStart = ''
chmod a+w $(realpath /sys/class/backlight/intel_backlight/brightness) || true
'';
# this makes sure my wifi doesn't take a minute to work
services.udev.extraRules = ''
SUBSYSTEM=="firmware", ACTION=="add", ATTR{loading}="-1"
'';
services.xserver.videoDrivers = ["modesetting"];
hardware.opengl.extraPackages = [ pkgs.vaapiIntel ];
2017-02-02 16:31:19 +01:00
# bigger console font
i18n.consoleFont = "latarcyrheb-sun32";
}