mirror of
https://github.com/jbowdre/dotfiles.git
synced 2024-12-22 12:22:17 +00:00
37 lines
935 B
Nix
37 lines
935 B
Nix
{
|
|
services = {
|
|
xserver = {
|
|
enable = true;
|
|
displayManager = {
|
|
gdm = {
|
|
enable = true;
|
|
autoSuspend = false;
|
|
wayland = true;
|
|
};
|
|
};
|
|
desktopManager = {
|
|
gnome.enable = true;
|
|
};
|
|
xkb.layout = "us";
|
|
xkb.variant = "";
|
|
};
|
|
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;
|
|
};
|
|
}
|