Files
dotfiles/config/modules/surface_patches.nix
T
2026-08-22 23:48:15 +01:00

86 lines
2.2 KiB
Nix

{
den,
modules,
inputs,
...
}:
{
flake-file.inputs = {
x1e-kernel.url = "git+ssh://git@git.scug.io:/nikkuss/x1e-staging.git?ref=staging";
x1e-kernel.inputs.nixpkgs.follows = "nixpkgs";
};
modules.surface-patches = {
nixos =
{ pkgs, lib, ... }:
{
imports = with inputs; [
x1e-kernel.nixosModules.default
];
# x1e.model = "15"; # "13" (default) or "15" — selects the correct DTB
# x1e.cpuParking = false; # loads cpu_parking at boot
# x1e.ecReboot = true; # loads ec_reboot at boot, exposes /sys/kernel/ec_reboot/reboot
x1e = {
model = "15";
cpuParking = false;
ecReboot = true;
el2 = {
debugTools = false;
enable = false;
};
iso = {
enable = true;
modules = [ ];
};
msm = {
extraPatches = [ ];
};
pmSdamTrace = {
enable = true;
};
psr = {
enable = false;
};
ramoops = {
enable = false;
};
spiHid = {
# drivers = [ "legacy" ];
legacy = {
enable = true;
};
v4 = {
enable = false;
};
};
ssamPmNotifier = {
enable = false;
};
ssamRequestTimeout = {
enable = true;
};
touchscreen = {
enable = false;
};
video = {
enable = false;
};
};
# Prevent reboot hang - qcom_smd_qrtr workers stuck in D-state
systemd.settings.Manager.DefaultTimeoutStopSec = "15s";
systemd.settings.Manager.DefaultDeviceTimeoutSec = "15s";
# Hardware watchdog (SBSA Generic Watchdog) as safety net
systemd.settings.Manager = {
KExecWatchdogSec = "30s";
RebootWatchdogSec = "30s";
RuntimeWatchdogSec = "30s";
};
# Override udevd stop timeout (D-state workers can't be killed)
systemd.services.systemd-udevd.serviceConfig.TimeoutStopSec = lib.mkForce "10s";
};
};
}