nixos/modules/hardware/chn-PC.nix

36 lines
854 B
Nix
Raw Normal View History

{ pkgs, ... }@inputs:
{
config =
{
nix.settings.system-features = [ "gccarch-alderlake" ];
services.dbus.implementation = "broker";
2023-06-19 17:22:54 +08:00
programs.dconf.enable = true;
hardware.opengl.enable = true;
2023-06-21 09:55:18 +08:00
systemd.services =
{
2023-06-21 09:55:18 +08:00
reload-iwlwifi-after-hibernate =
{
2023-06-21 09:55:18 +08:00
description = "reload iwlwifi after resume from hibernate";
after = [ "systemd-hibernate.service" ];
serviceConfig =
{
Type = "oneshot";
ExecStart =
[
"${pkgs.kmod}/bin/modprobe -r iwlwifi"
"${pkgs.kmod}/bin/modprobe iwlwifi"
"echo 0 | tee /sys/devices/system/cpu/intel_pstate/no_turbo"
];
};
wantedBy = [ "systemd-hibernate.service" ];
};
lid-no-wakeup =
{
description = "lid no wake up";
serviceConfig.ExecStart = "echo LID0 > /proc/acpi/wakeup";
wantedBy = [ "multi-user.target" ];
};
};
};
}