Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 0 additions & 73 deletions nixos/modules/services/x11/desktop-managers/plasma5.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down Expand Up @@ -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

{
Expand Down Expand Up @@ -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;
})
Expand Down