1
0
Fork 0
mirror of https://github.com/jbowdre/dotfiles.git synced 2024-12-22 04:12:18 +00:00
dotfiles/nixos/common/optional/gnome.nix

36 lines
921 B
Nix
Raw Permalink Normal View History

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