61 lines
1.8 KiB
Nix
61 lines
1.8 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
username,
|
|
inputs,
|
|
...
|
|
}:
|
|
{
|
|
imports = [
|
|
./common.nix
|
|
./disk_mreow.nix
|
|
|
|
inputs.nixos-hardware.nixosModules.framework-amd-ai-300-series
|
|
];
|
|
|
|
hardware.framework.laptop13.audioEnhancement.rawDeviceName =
|
|
lib.mkDefault "alsa_output.pci-0000_c1_00.6.analog-stereo";
|
|
|
|
# PST
|
|
# time.timeZone = lib.mkForce "America/Los_Angeles";
|
|
|
|
# weird hack to get swaylock working? idk, if you don't put this here, password entry doesnt work
|
|
# if I move to another lock screen program, i will have to replace `swaylock`
|
|
security.pam.services.swaylock = { };
|
|
|
|
# Kernel-level power tuning. These are boot-time / module-load-time settings
|
|
# that power-profiles-daemon (in common.nix) does not manage. ppd handles
|
|
# governor and EPP at runtime; these cover everything else.
|
|
boot.kernelParams = [
|
|
# Disable NMI watchdog. Eliminates periodic perf-counter interrupts
|
|
# across all cores (~1 W). Kernel softlockup watchdog remains active.
|
|
"nmi_watchdog=0"
|
|
|
|
# Route kernel work items to already-busy CPUs rather than waking idle
|
|
# ones. Reduces C-state exit frequency -- significant on battery where
|
|
# cores idle often.
|
|
"workqueue.power_efficient=1"
|
|
];
|
|
|
|
boot.kernel.sysctl."kernel.nmi_watchdog" = 0;
|
|
|
|
# Power-gate the HDA codec between audio activity. 1-second inactivity
|
|
# timeout; controller powers down fully. Wakes transparently on next
|
|
# audio event -- no audible artifacts on Framework 13 AMD.
|
|
boot.extraModprobeConfig = ''
|
|
options snd_hda_intel power_save=1 power_save_controller=Y
|
|
'';
|
|
|
|
# Greetd display manager
|
|
services.greetd = {
|
|
enable = true;
|
|
settings = {
|
|
default_session = {
|
|
command = "${lib.getExe pkgs.tuigreet} --time";
|
|
user = username;
|
|
};
|
|
};
|
|
};
|
|
}
|