Created
June 2, 2023 07:55
-
-
Save cenunix/5eb7a9d7a821acc90a731c6d7f51c76b to your computer and use it in GitHub Desktop.
X13s nixos configuration.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, lib, pkgs, ... }: | |
let | |
linux_x13s_pkg = { buildLinux, ... } @ args: | |
buildLinux (args // rec { | |
version = "6.3.5"; | |
modDirVersion = "6.3.5"; | |
src = pkgs.fetchurl { | |
url = "https://github.com/steev/linux/archive/refs/heads/lenovo-x13s-linux-6.3.y.tar.gz"; | |
sha256 = "sha256-eBVysWw9ktMz7lR9pqqkgUqdHC0QgKC24tK/9INsPmo="; | |
}; | |
kernelPatches = []; | |
extraMeta.branch = "lenovo-x13s-linux-6.3.y"; | |
} // (args.argsOverride or { })); | |
linux_x13s = pkgs.callPackage linux_x13s_pkg { | |
defconfig = "laptop_defconfig"; | |
}; | |
linuxPackages_x13s = pkgs.linuxPackagesFor linux_x13s; | |
dtbname = "sc8280xp-lenovo-thinkpad-x13s.dtb"; | |
in { | |
imports = [ ./hardware-configuration.nix ]; | |
boot = { | |
loader.systemd-boot.enable = true; | |
loader.efi.canTouchEfiVariables = true; | |
kernelPackages = linuxPackages_x13s; | |
kernelParams = [ | |
"efi=novamap,noruntime" | |
"clk_ignore_unused" | |
"pd_ignore_unused" | |
"root=PARTUUID=255a1f07-fa27-a641-b89f-ce4422318480" | |
"dtb='sc8280xp-lenovo-thinkpad-x13s.dtb" | |
]; | |
initrd = { | |
includeDefaultModules = false; | |
availableKernelModules = [ | |
"nvme" | |
"phy_qcom_qmp_pcie" | |
"pcie_qcom" | |
"i2c_hid_of" | |
"i2c_qcom_geni" | |
"leds_qcom_lpg" | |
"pwm_bl" | |
"qrtr" | |
"pmic_glink_altmode" | |
"gpio_sbu_mux" | |
"phy_qcom_qmp_combo" | |
"panel-edp" | |
"msm" | |
"phy_qcom_edp" | |
]; | |
}; | |
}; | |
users.users.cenunix = { | |
isNormalUser = true; | |
initialPassword = "changeme"; | |
home = "/home/cenunix"; | |
extraGroups = [ "wheel" "networkManager"]; | |
}; | |
networking.networkmanager.enable = true; | |
networking.hostName = "nixos-x13s"; | |
environment.systemPackages = [ | |
pkgs.neovim | |
pkgs.nano | |
pkgs.networkmanagerapplet | |
]; | |
system.stateVersion = "22.05"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment