mirror of
https://github.com/jbowdre/dotfiles.git
synced 2024-11-22 09:22:19 +00:00
gnome: attempt to prevent device from sleeping
This commit is contained in:
parent
ff1b0622d1
commit
9794125f0a
1 changed files with 31 additions and 9 deletions
|
@ -1,8 +1,11 @@
|
||||||
{
|
{
|
||||||
services.xserver = {
|
services = {
|
||||||
|
xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
displayManager = {
|
displayManager = {
|
||||||
gdm.enable = true;
|
gdm = {
|
||||||
|
enable = true;
|
||||||
|
autoSuspend = false;
|
||||||
};
|
};
|
||||||
desktopManager = {
|
desktopManager = {
|
||||||
gnome.enable = true;
|
gnome.enable = true;
|
||||||
|
@ -10,4 +13,23 @@
|
||||||
layout = "us";
|
layout = "us";
|
||||||
xkbVariant = "";
|
xkbVariant = "";
|
||||||
};
|
};
|
||||||
|
logind.lidSwitch = "ignore";
|
||||||
|
};
|
||||||
|
security.polkit.extraConfig = ''
|
||||||
|
polkit.addRule(function(action, subject) {
|
||||||
|
if (action.id == "org.freedesktop.login1.suspend" ||
|
||||||
|
action.id == "org.freedesktop.login1.suspend-multiple-sessions" ||
|
||||||
|
action.id == "org.freedesktop.login1.hibernate" ||
|
||||||
|
action.id == "org.freedesktop.login1.hibernate-multiple-sessions")
|
||||||
|
{
|
||||||
|
return polkit.Result.NO;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
'';
|
||||||
|
systemd.targets = {
|
||||||
|
sleep.enable = false;
|
||||||
|
suspend.enable = false;
|
||||||
|
hibernate.enable = false;
|
||||||
|
hybrid-sleep.enable = false;
|
||||||
|
};
|
||||||
}
|
}
|
Loading…
Reference in a new issue