From e39036d599ad51d6a3f77f7e96bfa630f4991410 Mon Sep 17 00:00:00 2001 From: ghostbuster91 Date: Sat, 6 May 2023 15:47:54 +0200 Subject: [PATCH] feat: Add focus m2 gen1 --- README.md | 1 + flake.nix | 1 + focus/m2/gen1/default.nix | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 focus/m2/gen1/default.nix diff --git a/README.md b/README.md index 83aaf38..59a923c 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,7 @@ See code for all available configurations. | [Framework](framework) | `` | | [Framework 12th Gen Intel Core](framework/12th-gen-intel) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | +| [Focus M2 Gen 1](focus/m2/gen1) | `` | | [GPD MicroPC](gpd/micropc) | `` | | [GPD P2 Max](gpd/p2-max) | `` | | [GPD Pocket 3](gpd/pocket-3) | `` | diff --git a/flake.nix b/flake.nix index b658115..c6348dc 100644 --- a/flake.nix +++ b/flake.nix @@ -58,6 +58,7 @@ framework = import ./framework; framework-12th-gen-intel = import ./framework/12th-gen-intel; friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; + focus-m2-gen1 = import ./focus/m2/gen1; google-pixelbook = import ./google/pixelbook; gpd-micropc = import ./gpd/micropc; gpd-p2-max = import ./gpd/p2-max; diff --git a/focus/m2/gen1/default.nix b/focus/m2/gen1/default.nix new file mode 100644 index 0000000..9c7e207 --- /dev/null +++ b/focus/m2/gen1/default.nix @@ -0,0 +1,27 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/gpu/nvidia/prime.nix + ../../../common/pc/laptop + ../../../common/pc/laptop/acpi_call.nix + ../../../common/pc/laptop/ssd + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.blacklistedKernelModules = [ "i2c_nvidia_gpu" ]; + + hardware.nvidia.modesetting.enable = lib.mkDefault true; + hardware.opengl = { + enable = lib.mkDefault true; + driSupport = lib.mkDefault true; + driSupport32Bit = lib.mkDefault true; + }; + + hardware.nvidia.prime = { + intelBusId = lib.mkDefault "PCI:0:2:0"; + nvidiaBusId = lib.mkDefault "PCI:1:0:0"; + }; +}