mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-23 03:19:42 +01:00
system76: Update configs to use the module from Nixpkgs.
This commit is contained in:
parent
602f9d86c6
commit
d86324ba69
2 changed files with 11 additions and 26 deletions
|
@ -1,6 +1,14 @@
|
||||||
# Hardware profile for the Darter Pro 6 laptop by System76.
|
# Hardware profile for the Darter Pro 6 laptop by System76.
|
||||||
#
|
#
|
||||||
# https://system76.com/laptops/darter
|
# https://system76.com/laptops/darter
|
||||||
|
#
|
||||||
|
# Regarding kernel modules, 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.
|
||||||
|
|
||||||
{ config, lib, options, pkgs, ... }:
|
{ config, lib, options, pkgs, ... }:
|
||||||
let
|
let
|
||||||
|
@ -15,18 +23,10 @@ let
|
||||||
soundSettingsAvailable =
|
soundSettingsAvailable =
|
||||||
soundSettingsDefined &&
|
soundSettingsDefined &&
|
||||||
(cfg.soundVendorId != null && cfg.soundSubsystemId != null);
|
(cfg.soundVendorId != null && cfg.soundSubsystemId != null);
|
||||||
|
|
||||||
# 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
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
../.
|
||||||
../../common/pc/laptop
|
../../common/pc/laptop
|
||||||
../../common/pc/laptop/ssd
|
../../common/pc/laptop/ssd
|
||||||
];
|
];
|
||||||
|
@ -56,12 +56,6 @@ in
|
||||||
|
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
{
|
{
|
||||||
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;
|
|
||||||
|
|
||||||
warnings = lib.optional (!soundSettingsDefined) ''
|
warnings = lib.optional (!soundSettingsDefined) ''
|
||||||
For full Darter Pro support, set the options:
|
For full Darter Pro support, set the options:
|
||||||
- hardware.system76.darp76.soundVendorId
|
- hardware.system76.darp76.soundVendorId
|
||||||
|
|
|
@ -2,21 +2,12 @@
|
||||||
#
|
#
|
||||||
# https://system76.com/
|
# https://system76.com/
|
||||||
|
|
||||||
{ config, ... }:
|
{ config, lib, ... }:
|
||||||
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 ];
|
imports = [ ../common/pc ];
|
||||||
|
|
||||||
# This seems to be required for system76-driver.
|
# This seems to be required for system76-driver.
|
||||||
boot.kernelParams = [ "ec_sys.write_support=1" ];
|
boot.kernelParams = [ "ec_sys.write_support=1" ];
|
||||||
|
|
||||||
boot.extraModulePackages = packages;
|
hardware.system76.enableAll = lib.mkDefault true;
|
||||||
|
|
||||||
# Explicitly attempt to load all available system76 modules. Some do
|
|
||||||
# (system76-acpi), some don't (system76-io).
|
|
||||||
boot.kernelModules = map (drv: drv.moduleName) packages;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue