templates/system/modules/ui/desktops/gnome.nix
Andre 27ddb4119d
Some checks are pending
Code Check / Run nixfmt and statix (push) Waiting to run
Initial working commit for new user system templates
2024-06-14 22:13:48 -04:00

73 lines
1.7 KiB
Nix

# Enables the Gnome desktop environment.
{
pkgs,
config,
lib,
...
}:
let
cfg = config.aux.ui.desktops.gnome;
in
{
options = {
aux.ui.desktops.gnome.enable = lib.mkEnableOption (
lib.mdDoc "Enables the Gnome Desktop Environment."
);
};
config = lib.mkIf cfg.enable {
aux.ui.desktops.enable = true;
# Enable Gnome
services.xserver = {
# Remove default packages that came with the install
excludePackages = [ pkgs.xterm ];
desktopManager.gnome.enable = true;
displayManager.gdm.enable = true;
};
environment = {
# Remove extraneous Gnome packages
gnome.excludePackages = with pkgs.gnome; [
gnome-software # Built-in software manager
totem # video player
tali # poker game
iagno # go game
hitori # sudoku game
atomix # puzzle game
];
# Install additional quality-of-life packages
systemPackages = with pkgs; [
gnome.gnome-tweaks # Gnome tweak tool
gnome.gnome-themes-extra # Additional themes
];
# Install GStreamer plugins
# References:
# https://wiki.nixos.org/wiki/GStreamer
# https://github.com/NixOS/nixpkgs/issues/195936
sessionVariables.GST_PLUGIN_SYSTEM_PATH_1_0 = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" (
with pkgs.gst_all_1;
[
gstreamer
gst-plugins-base
gst-plugins-good
gst-plugins-bad
gst-plugins-ugly
gst-libav
gst-vaapi
]
);
};
# Gnome UI integration for KDE apps
qt = {
enable = true;
platformTheme = "gnome";
style = "adwaita-dark";
};
};
}