From 2a66123a12bad57ef5797e182bf3552f68406f16 Mon Sep 17 00:00:00 2001 From: Superredstone Date: Sun, 26 Apr 2026 14:55:19 +0200 Subject: [PATCH] refactor(de): move gnome config to separate file --- modules/nix-config/de.nix | 49 ------------------------------------ modules/programs/default.nix | 3 ++- modules/programs/gnome.nix | 41 ++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 50 deletions(-) create mode 100644 modules/programs/gnome.nix diff --git a/modules/nix-config/de.nix b/modules/nix-config/de.nix index 448dad8..78ea5ae 100644 --- a/modules/nix-config/de.nix +++ b/modules/nix-config/de.nix @@ -1,7 +1,6 @@ { pkgs, lib, - config, currentSystemDe, ... }: @@ -23,63 +22,15 @@ in enable = true; wayland.enable = true; }; - gdm.enable = libDe.ifGnome true; }; # Desktop environments desktopManager = { plasma6.enable = libDe.ifPlasma true; - gnome.enable = libDe.ifGnome true; }; - - gnome.gnome-keyring.enable = true; }; environment.plasma6.excludePackages = with pkgs.kdePackages; [ elisa konsole ]; - environment.gnome.excludePackages = with pkgs; [ - epiphany - geary - gedit - gnome-characters - gnome-console - gnome-contacts - gnome-maps - gnome-music - gnome-software - gnome-tour - seahorse - simple-scan - xterm - yelp - ]; - - programs.kdeconnect = libDe.ifNotNone { - enable = true; - package = - if (currentSystemDe == "gnome") then - pkgs.gnomeExtensions.gsconnect - else - pkgs.kdePackages.kdeconnect-kde; - }; - - programs.thunar.plugins = - with pkgs.xfce; - libDe.ifGnome [ ] - ++ [ - thunar-archive-plugin - thunar-media-tags-plugin - thunar-vcs-plugin - tumbler - ]; - - # Hack to fix "Your GStreamer installation is missing a plug-in." inside of Nautilus - environment.sessionVariables.GST_PLUGIN_SYSTEM_PATH_1_0 = - lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" - [ - pkgs.gst_all_1.gst-plugins-good - pkgs.gst_all_1.gst-plugins-bad - pkgs.gst_all_1.gst-plugins-ugly - ]; } diff --git a/modules/programs/default.nix b/modules/programs/default.nix index 3b7357e..58e679d 100644 --- a/modules/programs/default.nix +++ b/modules/programs/default.nix @@ -8,7 +8,8 @@ imports = [ ] - ++ (if currentSystemDe == "niri" then [ ./niri.nix ] else [ ]); + ++ (if currentSystemDe == "niri" then [ ./niri.nix ] else [ ]) + ++ (if currentSystemDe == "gnome" then [ ./gnome.nix ] else [ ]); programs = { gamescope = { diff --git a/modules/programs/gnome.nix b/modules/programs/gnome.nix new file mode 100644 index 0000000..3f8dd0d --- /dev/null +++ b/modules/programs/gnome.nix @@ -0,0 +1,41 @@ +{ pkgs, lib, ... }: +{ + services = { + desktopManager.gnome.enable = true; + displayManager.gdm.enable = true; + gnome.gnome-keyring.enable = true; + }; + + environment.gnome.excludePackages = with pkgs; [ + epiphany + geary + gedit + gnome-characters + gnome-console + gnome-contacts + gnome-maps + gnome-music + gnome-software + gnome-tour + seahorse + simple-scan + xterm + yelp + ]; + + programs.thunar.plugins = with pkgs.xfce; [ + thunar-archive-plugin + thunar-media-tags-plugin + thunar-vcs-plugin + tumbler + ]; + + # Hack to fix "Your GStreamer installation is missing a plug-in." inside of Nautilus + environment.sessionVariables.GST_PLUGIN_SYSTEM_PATH_1_0 = + lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" + [ + pkgs.gst_all_1.gst-plugins-good + pkgs.gst_all_1.gst-plugins-bad + pkgs.gst_all_1.gst-plugins-ugly + ]; +}