I have set up a device with this hardware-configuration.nix
, which is imported by configuration.nix
, which is used in a flake (nixpkgs-unstable):
{ config, lib, pkgs, modulesPath, ... }:
let kernel = pkgs.linuxKernel.kernels.linux_6_1;
# ============== TOUCHSCREEN ================
gslx680-acpi = with pkgs; stdenv.mkDerivation rec {
name = "gslx680-acpi";
version = "v0.2.2";
src = fetchFromGitHub {
owner = "onitake";
repo = "gslx680-acpi";
rev = "${version}";
sha256 = "sha256-ZXnczstB5uFulVAMqT8Vmz5DtGCFPY0FkD61UKsiFg4=";
};
makeFlags = [
"KVER=${kernel.modDirVersion}"
"KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"MODDESTDIR=$(out)"
];
patches = [ ./gslx680-acpi-makefile.patch ];
nativeBuildInputs = kernel.moduleBuildDependencies;
};
# ============== BLUETOOTH ================
in
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
hardware.firmware = [
(
let
gsl-firmware = pkgs.fetchFromGitHub {
owner = "onitake";
repo = "gsl-firmware";
rev = "master";
sha256 = "sha256-S5Bxun9167+Iu+VHY4+XzvedTIkpLsCLMiQpR7twTNY=";
};
in
pkgs.runCommandNoCC "gsl-firmware" { } ''
mkdir -p $out/lib/firmware/silead
cp ${gsl-firmware}/firmware/chuwi/hi8/firmware.fw $out/lib/firmware/silead/gsl1680-chuwi-hi8.fw
''
)
];
boot.initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_acpi" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" "gslx680-acpi" ];
boot.extraModulePackages = [ gslx680-acpi ];
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_1;
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
I was trying to first load the out-of-tree kernel module from https://github.com/onitake/gslx860-acpi, and then copy the file from GitHub - onitake/gsl-firmware: Firmware repository for Silead touchscreen controllers (path: /firmware/chuwi/hi8/firmware.fw
) to /lib/firmware/silead/gsl1680-chuwi-hi8.fw
(That’s where the module on debian was searching for it, maybe nixos has a different place for it. idk)
It doesn’t work for some reason. The kernel module does not appear in /sys/modules
and /lib/firmware
doesn’t exist.
Can you help me?
UPDATE: for some reason there is gslx680_ts_acpi.ko
in /run/booted-system/kernel-modules
I have tried to put it in /lib/<...>
, but nothing changed