nixfiles/profiles/nixos/gui/environments/gnome/default.nix
2024-07-24 14:13:59 +01:00

77 lines
1.5 KiB
Nix

{
pkgs,
lib,
...
}: let
inherit (lib.modules) mkIf mkForce;
isWayland = true;
in {
services.xserver = {
enable = true;
desktopManager.gnome.enable = true;
displayManager.gdm = {
enable = true;
wayland = isWayland;
autoSuspend = false;
};
};
environment.variables = {
QT_QPA_PLATFORM =
if isWayland
then "wayland-egl"
else "xcb";
SDL_VIDEODRIVER =
if isWayland
then "wayland"
else "x11";
_JAVA_AWT_WM_NONREPARENTING = mkIf isWayland "1";
};
security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) {
if (subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
'';
environment.gnome.excludePackages = with pkgs; [
cheese
gnome.gnome-music
gnome-terminal
gedit
epiphany
evince
gnome.gnome-characters
totem
gnome.tali
gnome.iagno
gnome.hitori
gnome.atomix
gnome-tour
geary
];
environment.systemPackages = with pkgs; [
gnome-tweaks
gnomeExtensions.appindicator
gnomeExtensions.just-perfection
qt5.qtwayland
wl-clipboard
xclip
];
services.gnome.gnome-browser-connector.enable = true;
services.udev.packages = with pkgs; [gnome3.gnome-settings-daemon];
services.power-profiles-daemon.enable = true;
hardware.pulseaudio.enable = mkForce false;
programs.dconf.enable = true;
services.gnome.gnome-keyring.enable = mkForce false;
}