helm/hosts/shiro/hardware-configuration.nix

53 lines
1.4 KiB
Nix
Raw Normal View History

2020-01-17 01:31:10 -08:00
# 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 = [
2020-01-17 02:47:43 -08:00
<nixpkgs/nixos/modules/installer/scan/not-detected.nix>
2020-01-17 01:31:10 -08:00
(let nixos-hardware =
builtins.fetchTarball
https://github.com/NixOS/nixos-hardware/archive/master.tar.gz;
in "${nixos-hardware}/dell/xps/13-9370")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
## CPU
nix.maxJobs = lib.mkDefault 8;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
2020-04-12 18:02:27 -07:00
hardware.cpu.intel.updateMicrocode = true;
2020-01-17 01:31:10 -08:00
## SSDs
2020-01-17 02:47:43 -08:00
# services.fstrim.enable = true;
2020-01-17 01:31:10 -08:00
fileSystems = {
"/" = {
2020-01-17 02:47:43 -08:00
device = "/dev/disk/by-label/nixos";
2020-01-17 01:31:10 -08:00
fsType = "ext4";
2020-01-17 02:47:43 -08:00
options = [ "noatime" ];
2020-01-17 01:31:10 -08:00
};
"/boot" = {
2020-01-17 02:47:43 -08:00
device = "/dev/disk/by-label/BOOT";
2020-01-17 01:31:10 -08:00
fsType = "vfat";
};
"/home" = {
2020-01-17 02:47:43 -08:00
device = "/dev/disk/by-label/home";
2020-01-17 01:31:10 -08:00
fsType = "ext4";
2020-01-17 02:47:43 -08:00
options = [ "noatime" ];
2020-01-17 01:31:10 -08:00
};
};
swapDevices = [ { device = "/dev/disk/by-label/swap"; }];
2020-01-17 02:47:43 -08:00
# Encrypted /home
boot.initrd.luks.devices = [{
name = "home";
device = "/dev/nvme0n1p8";
preLVM = true;
allowDiscards = true;
}];
2020-01-17 01:31:10 -08:00
}