2024-06-24 11:38:28 -04:00
|
|
|
# Enables the Gnome desktop environment.
|
2024-05-07 18:02:59 -04:00
|
|
|
{
|
2024-09-19 13:40:37 -04:00
|
|
|
inputs,
|
2024-05-07 18:02:59 -04:00
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2024-02-29 09:53:34 -05:00
|
|
|
|
|
|
|
let
|
2024-06-24 11:38:28 -04:00
|
|
|
cfg = config.aux.system.ui.desktops.gnome;
|
2024-02-29 09:53:34 -05:00
|
|
|
in
|
|
|
|
{
|
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
options = {
|
2024-06-26 13:19:06 -04:00
|
|
|
aux.system.ui.desktops.gnome = {
|
2024-09-08 11:58:56 -04:00
|
|
|
enable = lib.mkEnableOption "Enables the Gnome Desktop Environment.";
|
2024-09-24 13:07:59 -04:00
|
|
|
experimental = {
|
|
|
|
fractionalScaling.enable = lib.mkEnableOption "Enables fractional scaling.";
|
|
|
|
tripleBuffering.enable = lib.mkEnableOption "Enables dynamic triple buffering for xwayland applications.";
|
2024-09-24 15:48:50 -04:00
|
|
|
vrr.enable = lib.mkEnableOption "Enables variable refresh rate (VRR).";
|
2024-09-24 13:07:59 -04:00
|
|
|
};
|
2024-06-26 13:19:06 -04:00
|
|
|
};
|
2024-05-07 18:02:59 -04:00
|
|
|
};
|
|
|
|
|
2024-06-24 11:38:28 -04:00
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
aux.system.ui.desktops.enable = true;
|
2024-05-07 18:02:59 -04:00
|
|
|
|
2024-06-24 11:38:28 -04:00
|
|
|
# Enable Gnome
|
2024-05-07 18:02:59 -04:00
|
|
|
services = {
|
|
|
|
xserver = {
|
2024-06-24 11:38:28 -04:00
|
|
|
# Remove default packages that came with the install
|
|
|
|
excludePackages = [ pkgs.xterm ];
|
2024-02-29 09:53:34 -05:00
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
# Enable Gnome
|
2024-09-24 13:07:59 -04:00
|
|
|
desktopManager.gnome = {
|
|
|
|
enable = true;
|
|
|
|
|
2024-09-24 15:48:50 -04:00
|
|
|
# Enable experimental features
|
|
|
|
extraGSettingsOverrides = ''
|
|
|
|
[org.gnome.mutter]
|
|
|
|
experimental-features = ${
|
|
|
|
lib.strings.concatStrings [
|
|
|
|
"[ "
|
|
|
|
(lib.mkIf cfg.experimental.fractionalScaling.enable "'scale-monitor-framebuffer', ").content
|
|
|
|
(lib.mkIf cfg.experimental.vrr.enable "'variable-refresh-rate'").content
|
|
|
|
" ]"
|
|
|
|
]
|
|
|
|
}
|
2024-09-24 13:07:59 -04:00
|
|
|
'';
|
2024-09-28 00:47:38 -04:00
|
|
|
extraGSettingsOverridePackages = lib.mkIf (
|
|
|
|
cfg.experimental.fractionalScaling.enable || cfg.experimental.vrr.enable
|
|
|
|
) [ pkgs.gnome.mutter ];
|
2024-09-24 13:07:59 -04:00
|
|
|
};
|
2024-05-21 09:22:03 -04:00
|
|
|
displayManager.gdm.enable = true;
|
2024-05-07 18:02:59 -04:00
|
|
|
};
|
2024-03-21 16:17:06 -04:00
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
# Install Flatpaks
|
|
|
|
flatpak.packages = [
|
2024-07-24 17:50:51 -04:00
|
|
|
"com.github.finefindus.eyedropper"
|
2024-05-07 18:02:59 -04:00
|
|
|
"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"
|
2024-05-07 18:02:59 -04:00
|
|
|
"org.gnome.TextEditor"
|
|
|
|
"org.gtk.Gtk3theme.Adwaita-dark"
|
|
|
|
];
|
|
|
|
};
|
2024-02-29 09:53:34 -05:00
|
|
|
|
2024-05-07 18:02:59 -04: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
|
|
|
|
])
|
2024-07-26 09:52:37 -04:00
|
|
|
++ (with pkgs.gnome; [
|
|
|
|
gnome-music
|
2024-05-07 18:02:59 -04:00
|
|
|
gnome-calendar
|
|
|
|
epiphany # web browser
|
|
|
|
geary # email reader
|
|
|
|
evince # document viewer
|
2024-07-26 09:52:37 -04:00
|
|
|
gnome-characters
|
|
|
|
gnome-software
|
2024-05-07 18:02:59 -04:00
|
|
|
totem # video player
|
2024-07-26 09:52:37 -04:00
|
|
|
tali # poker game
|
|
|
|
iagno # go game
|
|
|
|
hitori # sudoku game
|
|
|
|
atomix # puzzle game
|
2024-05-07 18:02:59 -04:00
|
|
|
]);
|
2024-02-29 09:53:34 -05:00
|
|
|
|
2024-06-08 01:29:05 -04:00
|
|
|
# Install additional packages
|
2024-05-07 18:02:59 -04:00
|
|
|
systemPackages = with pkgs; [
|
|
|
|
# Gnome tweak tools
|
2024-07-26 09:52:37 -04:00
|
|
|
gnome.gnome-tweaks
|
2024-05-07 18:02:59 -04:00
|
|
|
# Gnome extensions
|
2024-05-11 20:29:29 -04:00
|
|
|
gnomeExtensions.alphabetical-app-grid
|
|
|
|
gnomeExtensions.appindicator
|
|
|
|
gnomeExtensions.dash-to-panel
|
2024-05-07 18:02:59 -04:00
|
|
|
# Themeing
|
2024-07-26 09:52:37 -04:00
|
|
|
gnome.gnome-themes-extra
|
2024-05-07 18:02:59 -04:00
|
|
|
papirus-icon-theme
|
|
|
|
qogir-icon-theme
|
|
|
|
];
|
|
|
|
};
|
2024-02-29 09:53:34 -05:00
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
# Gnome UI integration for KDE apps
|
|
|
|
qt = {
|
|
|
|
enable = true;
|
|
|
|
platformTheme = "gnome";
|
|
|
|
style = "adwaita-dark";
|
|
|
|
};
|
2024-06-26 13:19:06 -04:00
|
|
|
|
2024-09-24 13:07:59 -04:00
|
|
|
nixpkgs.overlays = lib.mkIf cfg.experimental.tripleBuffering.enable [
|
2024-06-26 13:19:06 -04:00
|
|
|
(final: prev: {
|
|
|
|
gnome = prev.gnome.overrideScope (
|
|
|
|
gnomeFinal: gnomePrev: {
|
|
|
|
mutter = gnomePrev.mutter.overrideAttrs (old: {
|
2024-09-19 13:40:37 -04:00
|
|
|
src = inputs.gnome-triplebuffering;
|
2024-06-26 13:19:06 -04:00
|
|
|
});
|
|
|
|
}
|
|
|
|
);
|
|
|
|
})
|
|
|
|
];
|
2024-05-07 18:02:59 -04:00
|
|
|
};
|
2024-02-29 09:53:34 -05:00
|
|
|
}
|