dotfiles/hosts/common/optional/gnome.nix

38 lines
935 B
Nix
Raw Normal View History

2023-09-24 20:05:18 -05:00
{
services = {
xserver = {
enable = true;
displayManager = {
gdm = {
enable = true;
autoSuspend = false;
2024-01-04 12:35:48 -06:00
wayland = true;
2023-09-25 18:13:42 -05:00
};
};
desktopManager = {
gnome.enable = true;
};
2024-07-25 21:47:06 -05:00
xkb.layout = "us";
xkb.variant = "";
2023-09-24 20:05:18 -05: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-24 20:05:18 -05:00
};
2024-01-04 12:35:48 -06:00
}