{ config, lib, pkgs, modulesPath, ... }: { networking.hostName = "framework"; # CPU Stuff hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; networking.useDHCP = lib.mkDefault true; # networking.interfaces.wlp166s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.keyboard.qmk.enable = true; # For fingerprint support # services.fprintd.enable = lib.mkDefault true; # FSTrim for the SSD services.fstrim.enable = lib.mkDefault true; # Custom udev rules services.udev.extraRules = '' # Fix headphone noise when on powersave # https://community.frame.work/t/headphone-jack-intermittent-noise/5246/55 SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0xa0e0", ATTR{power/control}="on" # Ethernet expansion card support ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20" ''; # Mis-detected by nixos-generate-config # https://github.com/NixOS/nixpkgs/issues/171093 # https://wiki.archlinux.org/title/Framework_Laptop#Changing_the_brightness_of_the_monitor_does_not_work hardware.acpilight.enable = lib.mkDefault true; # Enable firmware updating services.fwupd.enable = true; # Power Stuff services.power-profiles-daemon.enable = false; # services.throttled.enable = true; //disabled due to errors on applying system config services.tlp = { enable = true; settings = { CPU_BOOST_ON_BAT = 0; CPU_SCALING_GOVERNOR_ON_BATTERY = "powersave"; CPU_SCALING_GOVERNOR_ON_AC= "performance"; CPU_ENERGY_PERF_POLICY_ON_AC= "balance_performance"; START_CHARGE_THRESH_BAT0 = 90; STOP_CHARGE_THRESH_BAT0 = 97; RUNTIME_PM_ON_BAT = "auto"; }; }; ## Keyboard controller support environment.systemPackages = with pkgs; [ via ]; services.udev.packages = [ pkgs.via ]; networking.bridges = { "br0" = { interfaces = [ "wlan0" ]; }; }; }