diff --git a/README.md b/README.md index 1bfe760..35b5af6 100644 --- a/README.md +++ b/README.md @@ -144,6 +144,7 @@ See code for all available configurations. | [Framework 12th Gen Intel Core](framework/13-inch/12th-gen-intel) | `` | | [Framework 13th Gen Intel Core](framework/13-inch/13th-gen-intel) | `` | | [Framework 13 AMD Ryzen 7040 Series](framework/13-inch/7040-amd) | `` | +| [Framework 16 AMD Ryzen 7040 Series](framework/16-inch/cpu/7040-amd) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | | [Focus M2 Gen 1](focus/m2/gen1) | `` | diff --git a/flake.nix b/flake.nix index 046d9be..05aae27 100644 --- a/flake.nix +++ b/flake.nix @@ -77,6 +77,7 @@ framework-12th-gen-intel = import ./framework/13-inch/12th-gen-intel; framework-13th-gen-intel = import ./framework/13-inch/13th-gen-intel; framework-13-7040-amd = import ./framework/13-inch/7040-amd; + framework-16-7040-amd = import ./framework/16-inch/cpu/7040-amd; friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s; focus-m2-gen1 = import ./focus/m2/gen1; diff --git a/framework/16-inch/cpu/7040-amd/README.md b/framework/16-inch/cpu/7040-amd/README.md new file mode 100644 index 0000000..fb9f2c3 --- /dev/null +++ b/framework/16-inch/cpu/7040-amd/README.md @@ -0,0 +1,18 @@ +# [Framework Laptop 16](https://frame.work/) + +## Updating Firmware + +First enable the `fwupd` service + +```nix +services.fwupd.enable = true; +``` + +Then run + +```sh + $ fwupdmgr update +``` + +- [Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop.Ryzen7040.BIOS.firmware) + diff --git a/framework/16-inch/cpu/7040-amd/default.nix b/framework/16-inch/cpu/7040-amd/default.nix new file mode 100644 index 0000000..2059a49 --- /dev/null +++ b/framework/16-inch/cpu/7040-amd/default.nix @@ -0,0 +1,10 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../common + ../common/amd.nix + ../../../../common/cpu/amd/raphael/igpu.nix + ]; + +} diff --git a/framework/16-inch/cpu/common/amd.nix b/framework/16-inch/cpu/common/amd.nix new file mode 100644 index 0000000..f75720d --- /dev/null +++ b/framework/16-inch/cpu/common/amd.nix @@ -0,0 +1,14 @@ +{ lib, config, ... }: { + imports = [ + ../../../../common/cpu/amd + ../../../../common/cpu/amd/pstate.nix + ../../../../common/gpu/amd + ]; + + # Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/ + boot.kernelParams = lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") ["rtc_cmos.use_acpi_alarm=1"] ; + + # AMD has better battery life with PPD over TLP: + # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 + services.power-profiles-daemon.enable = lib.mkDefault true; +} diff --git a/framework/16-inch/cpu/common/default.nix b/framework/16-inch/cpu/common/default.nix new file mode 100644 index 0000000..4105bc8 --- /dev/null +++ b/framework/16-inch/cpu/common/default.nix @@ -0,0 +1,30 @@ +{ lib, pkgs, ... }: { + imports = [ + ../../../../common/pc/laptop + ../../../../common/pc/laptop/ssd + ]; + + # Fix TRRS headphones missing a mic + # https://community.frame.work/t/headset-microphone-on-linux/12387/3 + boot.extraModprobeConfig = lib.mkIf (lib.versionOlder pkgs.linux.version "6.6.8") '' + options snd-hda-intel model=dell-headset-multi + ''; + + # For fingerprint support + services.fprintd.enable = lib.mkDefault true; + + # Custom udev rules + services.udev.extraRules = '' + # Ethernet expansion card support + ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20" + ''; + + # Fix font sizes in X + # services.xserver.dpi = 200; + + # Needed for desktop environments to detect/manage display brightness + hardware.sensor.iio.enable = lib.mkDefault true; + + # Enable keyboard customization + hardware.keyboard.qmk.enable = lib.mkDefault true; +}