mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-30 06:49:43 +01:00
modified nvidia services to allow for combination sleep/suspend
This commit is contained in:
parent
c2c275fbb2
commit
f8b9bfe69b
1 changed files with 18 additions and 0 deletions
|
@ -7,4 +7,22 @@ in
|
||||||
|
|
||||||
# enable the open source drivers if the package supports it
|
# enable the open source drivers if the package supports it
|
||||||
hardware.nvidia.open = lib.mkOverride 990 (nvidiaPackage ? open && nvidiaPackage ? firmware);
|
hardware.nvidia.open = lib.mkOverride 990 (nvidiaPackage ? open && nvidiaPackage ? firmware);
|
||||||
|
|
||||||
|
# nvidia's hibernate, suspend, and resume services are not normally triggered on suspend-then-hibernate and hybrid-hibernate
|
||||||
|
systemd.services = {
|
||||||
|
nvidia-hibernate = {
|
||||||
|
before = [ "systemd-suspend-then-hibernate.service" ];
|
||||||
|
wantedBy = [ "suspend-then-hibernate.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
nvidia-suspend = {
|
||||||
|
before = [ "systemd-hybrid-sleep.service" ];
|
||||||
|
wantedBy = [ "hybrid-sleep.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
nvidia-resume = {
|
||||||
|
after = [ "systemd-suspend-then-hibernate.service" "systemd-hybrid-sleep.service" ];
|
||||||
|
wantedBy = [ "post-resume.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue