{ config, lib, pkgs, inputs, modulesPath, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") inputs.nixos-hardware.nixosModules.dell-xps-13-9370 ]; boot = { initrd.availableKernelModules = [ "xhci_pci" "nvme" "rtsx_pci_sdmmc" ]; initrd.kernelModules = [ "dm-snapshot" ]; kernelModules = [ "kvm-intel" ]; extraModulePackages = [ ]; kernelParams = [ # HACK Disables fixes for spectre, meltdown, L1TF and a number of CPU # vulnerabilities. Don't copy this blindly! And especially not for # mission critical or server/headless builds exposed to the world. "mitigations=off" ]; }; # Modules modules.hardware = { audio.enable = true; fs = { enable = true; ssd.enable = true; }; }; # CPU nix.maxJobs = lib.mkDefault 8; hardware.cpu.intel.updateMicrocode = true; # performance gives better battery life/perf than ondemand on sandy bridge and # newer because of intel pstates. powerManagement.cpuFreqGovernor = "performance"; # Power management environment.systemPackages = [ pkgs.acpi ]; powerManagement.powertop.enable = true; # Monitor backlight control programs.light.enable = true; user.extraGroups = [ "video" ]; # Storage fileSystems = { "/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; options = [ "noatime" ]; }; "/boot" = { device = "/dev/disk/by-label/BOOT"; fsType = "vfat"; }; "/home" = { device = "/dev/disk/by-label/home"; fsType = "ext4"; options = [ "noatime" ]; }; "/usr/drive" = { device = "kiiro:/volume1/homes/hlissner/Drive"; fsType = "nfs"; options = [ "nofail" "noauto" "noatime" "x-systemd.automount" "nodev" "nosuid" "noexec" ]; }; }; swapDevices = [ { device = "/dev/disk/by-label/swap"; }]; boot.initrd.luks.devices.home = { device = "/dev/nvme0n1p8"; preLVM = true; allowDiscards = true; }; }