diff options
author | Yarny0 <41838844+Yarny0@users.noreply.github.com> | 2022-11-06 16:28:21 +0100 |
---|---|---|
committer | Yarny0 <41838844+Yarny0@users.noreply.github.com> | 2022-11-06 16:28:21 +0100 |
commit | 5e635986cadb1cd12de8349b428878cf7122a9c6 (patch) | |
tree | a42f0d5ec7c4e0cd201607b88323479d7c904dfa /nixos/modules/services/x11/desktop-managers/plasma5.nix | |
parent | 3bacde6273b09a21a8ccfba15586fb165078fb62 (diff) |
nixos/plasma: leave `displayManager.setupCommands` alone
Commit https://github.com/NixOS/nixpkgs/commit/4832352d023fdd9546748f33c499034d722382ba replaced the plasma5 session startup script with its upstream version from the `pkgs.libsForQt5.plasma5.plasma-workspace` package. In the course of doing so, the old session startup script wasn't removed, but got moved into the display manager startup shell commands option `displayManager.setupCommands`. This now causes those commands to be executed whenever the configured display manager starts. The old startup script performed some basic initializations in the user's home directory. With the new arrangement, the old startup script is run with HOME=/, leading to a lot of clutter in the root filesystem (entries like `/.config` or `/.gitrc-2.0`). The commit at hand simply removes the old session startup script completely, and with it a lot of now unused code from the plasma5 module.
Diffstat (limited to 'nixos/modules/services/x11/desktop-managers/plasma5.nix')
-rw-r--r-- | nixos/modules/services/x11/desktop-managers/plasma5.nix | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixos/modules/services/x11/desktop-managers/plasma5.nix index 44faa19bc22ab..f8e0f1dfeee7e 100644 --- a/nixos/modules/services/x11/desktop-managers/plasma5.nix +++ b/nixos/modules/services/x11/desktop-managers/plasma5.nix @@ -28,52 +28,11 @@ let libsForQt5 = pkgs.plasma5Packages; inherit (libsForQt5) kdeGear kdeFrameworks plasma5; - inherit (pkgs) writeText; inherit (lib) getBin optionalString literalExpression mkRemovedOptionModule mkRenamedOptionModule mkDefault mkIf mkMerge mkOption types; - ini = pkgs.formats.ini { }; - - gtkrc2 = writeText "gtkrc-2.0" '' - # Default GTK+ 2 config for NixOS Plasma 5 - include "/run/current-system/sw/share/themes/Breeze/gtk-2.0/gtkrc" - style "user-font" - { - font_name="Sans Serif Regular" - } - widget_class "*" style "user-font" - gtk-font-name="Sans Serif Regular 10" - gtk-theme-name="Breeze" - gtk-icon-theme-name="breeze" - gtk-fallback-icon-theme="hicolor" - gtk-cursor-theme-name="breeze_cursors" - gtk-toolbar-style=GTK_TOOLBAR_ICONS - gtk-menu-images=1 - gtk-button-images=1 - ''; - - gtk3_settings = ini.generate "settings.ini" { - Settings = { - gtk-font-name = "Sans Serif Regular 10"; - gtk-theme-name = "Breeze"; - gtk-icon-theme-name = "breeze"; - gtk-fallback-icon-theme = "hicolor"; - gtk-cursor-theme-name = "breeze_cursors"; - gtk-toolbar-style = "GTK_TOOLBAR_ICONS"; - gtk-menu-images = 1; - gtk-button-images = 1; - }; - }; - - kcminputrc = ini.generate "kcminputrc" { - Mouse = { - cursorTheme = "breeze_cursors"; - cursorSize = 0; - }; - }; - activationScript = '' ${set_XDG_CONFIG_HOME} @@ -119,37 +78,6 @@ let XDG_CONFIG_HOME=''${XDG_CONFIG_HOME:-$HOME/.config} ''; - startplasma = '' - ${set_XDG_CONFIG_HOME} - mkdir -p "''${XDG_CONFIG_HOME}" - '' + optionalString config.hardware.pulseaudio.enable '' - # Load PulseAudio module for routing support. - # See also: http://colin.guthr.ie/2009/10/so-how-does-the-kde-pulseaudio-support-work-anyway/ - ${getBin config.hardware.pulseaudio.package}/bin/pactl load-module module-device-manager "do_routing=1" - '' + '' - ${activationScript} - - # Create default configurations if Plasma has never been started. - kdeglobals="''${XDG_CONFIG_HOME}/kdeglobals" - if ! [ -f "$kdeglobals" ]; then - kcminputrc="''${XDG_CONFIG_HOME}/kcminputrc" - if ! [ -f "$kcminputrc" ]; then - cat ${kcminputrc} >"$kcminputrc" - fi - - gtkrc2="$HOME/.gtkrc-2.0" - if ! [ -f "$gtkrc2" ]; then - cat ${gtkrc2} >"$gtkrc2" - fi - - gtk3_settings="''${XDG_CONFIG_HOME}/gtk-3.0/settings.ini" - if ! [ -f "$gtk3_settings" ]; then - mkdir -p "$(dirname "$gtk3_settings")" - cat ${gtk3_settings} >"$gtk3_settings" - fi - fi - ''; - in { @@ -449,7 +377,6 @@ in # Update the start menu for each user that is currently logged in system.userActivationScripts.plasmaSetup = activationScript; - services.xserver.displayManager.setupCommands = startplasma; nixpkgs.config.firefox.enablePlasmaBrowserIntegration = true; }) |