surface wip

This commit is contained in:
2026-04-09 21:38:16 +01:00
parent 8ca46d9edc
commit aa9d3a056f
9 changed files with 182 additions and 67 deletions
+41 -38
View File
@@ -11,30 +11,32 @@
includes = [
modules.nix
modules.tuigreet
<modules/common/laptop-power-management>
# <modules/common/laptop-power-management>
modules.fonts
(modules.tdp {
batt = {
cpu = {
long-term = 13;
short-term = 7;
};
mmio = {
long-term = 10;
short-term = 7;
};
};
ac = {
cpu = {
long-term = 120;
short-term = 120;
};
mmio = {
long-term = 40;
short-term = 20;
};
};
})
modules.surface-patches
modules.nikpkgs
# (modules.tdp {
# batt = {
# cpu = {
# long-term = 13;
# short-term = 7;
# };
# mmio = {
# long-term = 10;
# short-term = 7;
# };
# };
# ac = {
# cpu = {
# long-term = 120;
# short-term = 120;
# };
# mmio = {
# long-term = 40;
# short-term = 20;
# };
# };
# })
];
nixos =
{ pkgs, config, ... }:
@@ -44,10 +46,10 @@
boot.loader.efi.canTouchEfiVariables = true;
# boot.kernelPackages = pkgs.linuxPackages_6_12; # Hibernate works on 6.12 but not on latest
# boot.kernelPackages = pkgs.linuxPackages_latest; # Unpinned the linux version for now.. as i am not using hibernate that often
boot.kernelPackages =
inputs.nix-cachyos-kernel.legacyPackages.x86_64-linux.linuxPackages-cachyos-latest-lto-x86_64-v3;
# boot.kernelPackages =
# inputs.nix-cachyos-kernel.legacyPackages.x86_64-linux.linuxPackages-cachyos-latest-lto-x86_64-v3;
networking.hostName = "doloro-nixos-laptop"; # Define your hostname.
security.rtkit.enable = true;
# security.rtkit.enable = true;
# Configure network connections interactively with nmcli or nmtui.
networking.networkmanager.enable = true;
@@ -55,6 +57,7 @@
# Set your time zone.
# time.timeZone = "Europe/London";
services.automatic-timezoned.enable = true;
networking.wireless.iwd.enable = false;
nix.settings = {
substituters = [
@@ -75,7 +78,7 @@
];
};
services.gnome.gnome-keyring.enable = true;
# services.gnome.gnome-keyring.enable = true;
nixpkgs.config.packageOverrides = pkgs: {
intel-vaapi-driver = pkgs.intel-vaapi-driver.override { enableHybridCodec = true; };
@@ -86,9 +89,9 @@
enable = true;
extraPackages = with pkgs; [
# vpl-gpu-rt
intel-media-driver # VA-API (iHD) userspace
# intel-media-driver # VA-API (iHD) userspace
# vpl-gpu-rt # oneVPL (QSV) runtime
intel-compute-runtime # OpenCL (NEO) + Level Zero for Arc/Xe
# intel-compute-runtime # OpenCL (NEO) + Level Zero for Arc/Xe
];
};
};
@@ -129,7 +132,7 @@
services.libinput.enable = true;
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
# boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
# Define a user account. Don't forget to set a password with passwd.
# users.users.doloro = {
# isNormalUser = true;
@@ -157,20 +160,20 @@
boot.kernelParams = [
# "mem_sleep_default=deep"
"i915.fastboot=1"
"i915.modeset=1"
"ahci.mobile_lpm_policy=1"
"intel_idle.max_cstate=10"
"processor.max_cstate=10"
# "i915.fastboot=1"
# "i915.modeset=1"
# "ahci.mobile_lpm_policy=1"
# "intel_idle.max_cstate=10"
# "processor.max_cstate=10"
# "quiet"
# "splash"
# "idle=halt"
];
services.logind.settings.Login = {
HandleLidSwitch = "suspend";
HandleLidSwitchExternalPower = "suspend";
HandleLidSwitchDocked = "ignore";
# HandleLidSwitch = "suspend";
# HandleLidSwitchExternalPower = "suspend";
# HandleLidSwitchDocked = "ignore";
};
# systemd.sleep.extraConfig = ''
# HibernateDelaySec=30min