dotfiles/hosts/common/optional/gnome.nix

36 lines
903 B
Nix
Raw Normal View History

2023-09-25 01:05:18 +00:00
{
services = {
xserver = {
enable = true;
displayManager = {
gdm = {
enable = true;
autoSuspend = false;
2023-09-25 23:13:42 +00:00
};
};
desktopManager = {
gnome.enable = true;
};
layout = "us";
xkbVariant = "";
2023-09-25 01:05:18 +00:00
};
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;
2023-09-25 01:05:18 +00:00
};
}