Files
Daniel Schaefer 3a4da5f8c1 framework: Enable fwupd by default
Users should keep their firmware (not just BIOS) up to date.
Framework 13 Intel 11-13th Gen have some components that can't be
updated with fwupd, so some BIOS versions are better to be installed
through the EFI shell or Windows.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2025-08-27 01:11:13 +08:00

50 lines
1.5 KiB
Nix

{
config,
lib,
pkgs,
...
}:
{
imports = [
../common
../common/intel.nix
];
# Everything is updateable through fwupd
services.fwupd.enable = true;
# Need at least 6.9 to make suspend properly
# Specifically this patch: https://github.com/torvalds/linux/commit/073237281a508ac80ec025872ad7de50cfb5a28a
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.9") (
lib.mkDefault pkgs.linuxPackages_latest
);
# Intel NPU Driver
# https://discourse.nixos.org/t/new-installation-on-asus-zenbook-ux5406-intel-vpu-firmware-error-2/58732/2
hardware.firmware = lib.optionals (config.hardware.enableRedistributableFirmware) [
(
let
model = "37xx";
version = "0.0";
firmware = pkgs.fetchurl {
url = "https://github.com/intel/linux-npu-driver/raw/v1.13.0/firmware/bin/vpu_${model}_v${version}.bin";
hash = "sha256-Mpoeq8HrwChjtHALsss/7QsFtDYAoFNsnhllU0xp3os=";
};
in
pkgs.runCommand "intel-vpu-firmware-${model}-${version}" { } ''
mkdir -p "$out/lib/firmware/intel/vpu"
cp '${firmware}' "$out/lib/firmware/intel/vpu/vpu_${model}_v${version}.bin"
''
)
];
warnings = lib.mkIf (!config.hardware.enableRedistributableFirmware) [
''For Intel NPU support, set the option: hardware.enableRedistributableFirmware = true;''
];
hardware.framework.laptop13.audioEnhancement.rawDeviceName =
lib.mkDefault "alsa_output.pci-0000_00_1f.3.analog-stereo";
}