aux-config/systems/x86_64-linux/LANA9Z/hardware.nix

85 lines
2.4 KiB
Nix

{ config, lib, pkgs, modulesPath, inputs, ... }: let
inherit (inputs) nixos-hardware;
in {
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
nixos-hardware.nixosModules.apple-macbook-pro-8-1
];
# Configure NixOS
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
# Boot Parameters
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "firewire_ohci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" "wl" ];
boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
# Filesystems
fileSystems."/" = {
device = "/dev/disk/by-uuid/33872d2c-3008-47ad-a7cf-fed7b259dfb0";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-732125b8-36af-43ea-b684-db71b4c20406".device = "/dev/disk/by-uuid/732125b8-36af-43ea-b684-db71b4c20406";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/3C84-DD6D";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [
{
device = "/swapfile";
size = 16*1024;
}
];
# Network
networking.useDHCP = lib.mkDefault true;
# Hardware
hardware.bosto-touchpad.enable = true;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.graphics = {
enable = true;
extraPackages = [ pkgs.intel-media-sdk ];
};
# Power Management
# services.tlp.enable = false;
# services.power-profiles-daemon.enable = false;
# services.auto-cpufreq.enable = true;
# services.auto-cpufreq.settings = {
# battery = {
# governor = "powersave";
# turbo = "never";
# };
# charger = {
# governor = "performance";
# turbo = "auto";
# };
# };
services.power-profiles-daemon.enable = false;
services.tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "balanced";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 80;
#Optional helps save long term battery health
START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
};
};
}