I would like to share the relevant part of my configuration as I spent quite some time to get NixOS booting on my ThinkPad T14s Gen 6 (Snapdragon X Elite X1E-78-100)
.
This would not have been possible without the working Ubuntu installer image and the support in Ubuntu 24.10 Concept ♥️ Snapdragon X Elite - Ubuntu Concept - Ubuntu Community Hub
Some things like accelerated graphics, battery gauge and sound require firmware files from the Windows image, which I did not bother with.
boot = {
kernelPackages = let kernel_pkg = { fetchgit, buildLinux, ... } @ args:
buildLinux (args // rec {
version = "6.12.0";
src = pkgs.fetchgit {
url = "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git";
rev = "06090c9b622a7e1f797e775db4c035e0d779b76e";
hash = "sha256-49t94CaLdkxrmxG9Wie+p1wk6VNhraawR0vOjoFR3bY=";
};
} // (args.argsOverride or {}));
kernel = pkgs.callPackage kernel_pkg{};
in
pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor kernel);
kernelParams = [ "cma=128M" "clk_ignore_unused" "pd_ignore_unused" ];
kernelPatches = [ {
name = "snapdragon-config";
patch = null;
extraConfig = ''
TYPEC y
PHY_QCOM_QMP y
QCOM_CLK_RPM y
MFD_QCOM_RPM y
REGULATOR_QCOM_RPM y
PHY_QCOM_QMP_PCIE y
CLK_X1E80100_CAMCC y
'';
} ];
loader = {
efi.canTouchEfiVariables = true;
systemd-boot = {
enable = true;
};
};
};
hardware = {
deviceTree = {
enable = true;
name = "qcom/x1e78100-lenovo-thinkpad-t14s.dtb";
};
enableRedistributableFirmware = true;
};
edit: forgot to merge the devicetree.