1
0
Fork 0
nix-configuration/modules/ui/desktops/gnome.nix

129 lines
3.5 KiB
Nix
Raw Normal View History

# Enables the Gnome desktop environment.
{
pkgs,
config,
lib,
...
}:
2024-02-29 09:53:34 -05:00
let
cfg = config.aux.system.ui.desktops.gnome;
2024-02-29 09:53:34 -05:00
in
{
options = {
aux.system.ui.desktops.gnome = {
2024-09-08 11:58:56 -04:00
enable = lib.mkEnableOption "Enables the Gnome Desktop Environment.";
experimentalFeatures.enable = lib.mkEnableOption "Enables dynamic triple buffering and fractional scaling for xwayland applications.";
};
};
config = lib.mkIf cfg.enable {
aux.system.ui.desktops.enable = true;
# Enable Gnome
services = {
xserver = {
# Remove default packages that came with the install
excludePackages = [ pkgs.xterm ];
2024-02-29 09:53:34 -05:00
# Enable Gnome
desktopManager.gnome.enable = true;
displayManager.gdm.enable = true;
};
2024-03-21 16:17:06 -04:00
# Install Flatpaks
flatpak.packages = [
2024-07-24 17:50:51 -04:00
"com.github.finefindus.eyedropper"
"com.mattjakeman.ExtensionManager"
"org.bluesabre.MenuLibre"
"org.gnome.baobab"
"org.gnome.Calculator"
"org.gnome.Characters"
"org.gnome.Calendar"
"org.gnome.Evince"
"org.gnome.Evolution"
"org.gnome.FileRoller"
"org.gnome.Firmware"
"org.gnome.gitg"
"org.gnome.Loupe" # Gnome's fancy new image viewer
"org.gnome.Music"
"org.gnome.seahorse.Application"
2024-05-26 12:23:12 -04:00
"org.gnome.Shotwell"
"org.gnome.TextEditor"
"org.gtk.Gtk3theme.Adwaita-dark"
];
};
2024-02-29 09:53:34 -05:00
environment = {
# Remove default Gnome packages that came with the install, then install the ones I actually use
gnome.excludePackages =
(with pkgs; [
gnome-photos
gnome-tour
gnomeExtensions.extension-list
gedit # text editor
])
++ (with pkgs.gnome; [
gnome-music
gnome-calendar
epiphany # web browser
geary # email reader
evince # document viewer
gnome-characters
gnome-software
totem # video player
tali # poker game
iagno # go game
hitori # sudoku game
atomix # puzzle game
]);
2024-02-29 09:53:34 -05:00
2024-06-08 01:29:05 -04:00
# Install additional packages
systemPackages = with pkgs; [
# Gnome tweak tools
gnome.gnome-tweaks
# Gnome extensions
2024-05-11 20:29:29 -04:00
gnomeExtensions.alphabetical-app-grid
gnomeExtensions.appindicator
gnomeExtensions.dash-to-panel
2024-09-08 11:58:56 -04:00
gnomeExtensions.random-wallpaper
# Themeing
gnome.gnome-themes-extra
papirus-icon-theme
qogir-icon-theme
];
};
2024-02-29 09:53:34 -05:00
# Gnome UI integration for KDE apps
qt = {
enable = true;
platformTheme = "gnome";
style = "adwaita-dark";
};
nixpkgs.overlays = lib.mkIf cfg.experimentalFeatures.enable [
# GNOME 46: triple-buffering-v4-46
# For details, see https://wiki.nixos.org/wiki/GNOME#Dynamic_triple_buffering
(final: prev: {
gnome = prev.gnome.overrideScope (
gnomeFinal: gnomePrev: {
mutter = gnomePrev.mutter.overrideAttrs (old: {
src = pkgs.fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "vanvugt";
repo = "mutter";
rev = "triple-buffering-v4-46";
2024-08-16 14:28:24 -04:00
hash = "sha256-C2VfW3ThPEZ37YkX7ejlyumLnWa9oij333d5c4yfZxc=";
};
# Scaling patch sourced from https://aur.archlinux.org/packages/mutter-xwayland-scaling
patches = [ ./patches/gnome-mutter-xwayland-scaling.patch ];
});
}
);
})
];
};
2024-02-29 09:53:34 -05:00
}