some stuff
This commit is contained in:
parent
cc83f63010
commit
4ae26b48df
10 changed files with 51 additions and 80 deletions
|
@ -1,37 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
# From https://github.com/NixOS/nixos-hardware/blob/master/gigabyte/b550/b550-fix-suspend.nix using until
|
||||
# it has been merged into the flake.
|
||||
systemd.services.bugfixSuspend-GPP0 = {
|
||||
enable = lib.mkDefault true;
|
||||
description = "Fix crash on wakeup from suspend/hibernate (b550 bugfix)";
|
||||
unitConfig = {
|
||||
Type = "oneshot";
|
||||
};
|
||||
serviceConfig = {
|
||||
User = "root"; # root may not be necessary
|
||||
# check for gppN, disable if enabled
|
||||
# lifted from https://www.reddit.com/r/gigabyte/comments/p5ewjn/comment/ksbm0mb/ /u/Demotay
|
||||
ExecStart = "-${pkgs.bash}/bin/bash -c 'if grep 'GPP0' /proc/acpi/wakeup | grep -q 'enabled'; then echo 'GPP0' > /proc/acpi/wakeup; fi'";
|
||||
RemainAfterExit = "yes"; # required to not toggle when `nixos-rebuild switch` is ran
|
||||
};
|
||||
wantedBy = ["multi-user.target"];
|
||||
};
|
||||
|
||||
systemd.services.bugfixSuspend-GPP8 = {
|
||||
enable = lib.mkDefault true;
|
||||
description = "Fix crash on wakeup from suspend/hibernate (b550 bugfix)";
|
||||
unitConfig = {
|
||||
Type = "oneshot";
|
||||
};
|
||||
serviceConfig = {
|
||||
User = "root";
|
||||
ExecStart = "-${pkgs.bash}/bin/bash -c 'if grep 'GPP8' /proc/acpi/wakeup | grep -q 'enabled'; then echo 'GPP8' > /proc/acpi/wakeup; fi'";
|
||||
RemainAfterExit = "yes";
|
||||
};
|
||||
wantedBy = ["multi-user.target"];
|
||||
};
|
||||
}
|
|
@ -9,7 +9,6 @@
|
|||
inputs.hardware.nixosModules.common-gpu-amd
|
||||
inputs.hardware.nixosModules.common-pc-ssd
|
||||
inputs.hardware.nixosModules.gigabyte-b550
|
||||
#./gigabyte-b550-fix.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue