modularize DE-related system config

This commit is contained in:
Yan Lin 2025-10-28 21:03:26 +01:00
parent 9102264fcc
commit 1fa32a8f93
4 changed files with 118 additions and 97 deletions

68
modules/desktop.nix Normal file
View file

@ -0,0 +1,68 @@
{ config, pkgs, lib, ... }:
{
# GNOME Desktop Environment
services.xserver.enable = true;
services.displayManager.gdm.enable = true;
services.desktopManager.gnome.enable = true;
# Keyboard layout
services.xserver.xkb = {
layout = "us";
options = "";
};
# Exclude unwanted GNOME default packages
environment.gnome.excludePackages = with pkgs; [
gnome-tour
gnome-console # terminal (using Ghostty instead)
gnome-text-editor # text editor (using Neovim instead)
gnome-connections # remote desktop client
gnome-font-viewer # font viewer
seahorse # passwords and keys
baobab # disk usage analyzer
gnome-disk-utility # disks
gnome-logs # logs viewer
gnome-system-monitor # system monitor
decibels # audio player
epiphany # GNOME web browser
file-roller # archive manager
geary # GNOME email client
gnome-music
gnome-photos
gnome-maps
gnome-weather
gnome-contacts
gnome-clocks
gnome-calculator
gnome-calendar
gnome-characters
simple-scan
snapshot # camera
totem # video player
yelp # help viewer
];
# XDG portal for proper desktop integration
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gnome
xdg-desktop-portal-gtk
];
};
# Touchpad configuration
services.libinput = {
enable = true;
touchpad = {
naturalScrolling = true;
tapping = true;
};
};
# System packages for GNOME
environment.systemPackages = with pkgs; [
hicolor-icon-theme # Fallback icon theme
];
}