diff --git a/CODEOWNERS b/CODEOWNERS index 4f2bb2c..1bbf05e 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -5,3 +5,4 @@ lenovo/thinkpad/x230 @makefu @yegortimoshenko lenovo/thinkpad/x250 @Mic92 pcengines/apu @yegortimoshenko purism/librem/13v3 @yegortimoshenko +system76/darp6 @khumba diff --git a/README.md b/README.md index 4d23e8d..0af8c29 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,8 @@ See code for all available configurations. | [Purism Librem 15v3][] | `` | | Supermicro A1SRi-2758F | `` | | Supermicro X10SLL-F | `` | +| [System76 (generic)][] | `` | +| [System76 Darter Pro 6][] | `` | | [Toshiba Chromebook 2 `swanky`][] | `` | | [Tuxedo InfinityBook v4][] | `` | @@ -151,6 +153,8 @@ See code for all available configurations. [Microsoft Surface Pro 3]: microsoft/surface-pro/3 [Raspberry Pi 2]: raspberry-pi/2 [Samsung Series 9 NP900X3C]: samsung/np900x3c +[System76 (generic)]: system76 +[System76 Darter Pro 6]: system76/darp6 [Purism Librem 13v3]: purism/librem/13v3 [Purism Librem 15v5]: purism/librem/15v5 [Toshiba Chromebook 2 `swanky`]: toshiba/swanky diff --git a/flake.nix b/flake.nix index 43fb6fc..31d61c4 100644 --- a/flake.nix +++ b/flake.nix @@ -56,6 +56,8 @@ pcengines-apu = import ./pcengines/apu; raspberry-pi-2 = import ./raspberry-pi/2; samsung-np900x3c = import ./samsung/np900x3c; + system76 = import ./system76; + system76-darp6 = import ./system76/darp6; purism-librem-13v3 = import ./purism/librem/13v3; purism-librem-15v3 = import ./purism/librem/15v3; supermicro-a1sri-2758f = import ./supermicro/a1sri-2758f; diff --git a/system76/darp6/default.nix b/system76/darp6/default.nix new file mode 100644 index 0000000..545523d --- /dev/null +++ b/system76/darp6/default.nix @@ -0,0 +1,27 @@ +# Hardware profile for the Darter Pro 6 laptop by System76. +# +# https://system76.com/laptops/darter + +{ config, ... }: +let + # darp6 needs system76-acpi-dkms, not system76-dkms: + # + # [1] https://github.com/pop-os/system76-dkms/issues/39 + # jackpot51> system76-acpi-dkms is the correct driver to use on the darp6 + # + # system76-io-dkms also appears to be loaded on darp6 with Pop!_OS, and + # system76-dkms does not, and in fact refuses to load. + packages = with config.boot.kernelPackages; [ system76-acpi system76-io ]; +in +{ + imports = [ + ../../common/pc/laptop + ../../common/pc/laptop/ssd + ]; + + boot.extraModulePackages = packages; + + # system76_acpi automatically loads on darp6, but system76_io does not. + # Explicitly list all modules to be loaded, for consistency. + boot.kernelModules = map (drv: drv.moduleName) packages; +} diff --git a/system76/default.nix b/system76/default.nix new file mode 100644 index 0000000..64b1032 --- /dev/null +++ b/system76/default.nix @@ -0,0 +1,22 @@ +# Implementation of support for general System76 hardware. +# +# https://system76.com/ + +{ config, ... }: +let + # Try loading all system76 modules. The ones not relevant to specific + # hardware won't be loaded. + packages = with config.boot.kernelPackages; [ system76 system76-acpi system76-io ]; +in +{ + imports = [ ../common/pc ]; + + # This seems to be required for system76-driver. + boot.kernelParams = [ "ec_sys.write_support=1" ]; + + boot.extraModulePackages = packages; + + # Explicitly attempt to load all available system76 modules. Some do + # (system76-acpi), some don't (system76-io). + boot.kernelModules = map (drv: drv.moduleName) packages; +}