Files

39 lines
1.1 KiB
Nix

{
den,
modules,
inputs,
...
}:
{
flake-file.inputs = {
x1e-kernel.url = "git+https://git.scug.io/nikkuss/x1e-nixos.git";
};
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
# 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";
};
};
}