···
libsForQt5 = pkgs.plasma5Packages;
inherit (libsForQt5) kdeGear kdeFrameworks plasma5;
31
-
inherit (pkgs) writeText;
getBin optionalString literalExpression
mkRemovedOptionModule mkRenamedOptionModule
mkDefault mkIf mkMerge mkOption mkPackageOptionMD types;
37
-
ini = pkgs.formats.ini { };
39
-
gtkrc2 = writeText "gtkrc-2.0" ''
40
-
# Default GTK+ 2 config for NixOS Plasma 5
41
-
include "/run/current-system/sw/share/themes/Breeze/gtk-2.0/gtkrc"
44
-
font_name="Sans Serif Regular"
46
-
widget_class "*" style "user-font"
47
-
gtk-font-name="Sans Serif Regular 10"
48
-
gtk-theme-name="Breeze"
49
-
gtk-icon-theme-name="breeze"
50
-
gtk-fallback-icon-theme="hicolor"
51
-
gtk-cursor-theme-name="breeze_cursors"
52
-
gtk-toolbar-style=GTK_TOOLBAR_ICONS
57
-
gtk3_settings = ini.generate "settings.ini" {
59
-
gtk-font-name = "Sans Serif Regular 10";
60
-
gtk-theme-name = "Breeze";
61
-
gtk-icon-theme-name = "breeze";
62
-
gtk-fallback-icon-theme = "hicolor";
63
-
gtk-cursor-theme-name = "breeze_cursors";
64
-
gtk-toolbar-style = "GTK_TOOLBAR_ICONS";
65
-
gtk-menu-images = 1;
66
-
gtk-button-images = 1;
70
-
kcminputrc = ini.generate "kcminputrc" {
72
-
cursorTheme = "breeze_cursors";
···
# expected to set the default themselves.
# 2. Contaminate / if $HOME is unset; do not check if $HOME is set.
XDG_CONFIG_HOME=''${XDG_CONFIG_HOME:-$HOME/.config}
123
-
${set_XDG_CONFIG_HOME}
124
-
mkdir -p "''${XDG_CONFIG_HOME}"
125
-
'' + optionalString config.hardware.pulseaudio.enable ''
126
-
# Load PulseAudio module for routing support.
127
-
# See also: http://colin.guthr.ie/2009/10/so-how-does-the-kde-pulseaudio-support-work-anyway/
128
-
${getBin config.hardware.pulseaudio.package}/bin/pactl load-module module-device-manager "do_routing=1"
130
-
${activationScript}
132
-
# Create default configurations if Plasma has never been started.
133
-
kdeglobals="''${XDG_CONFIG_HOME}/kdeglobals"
134
-
if ! [ -f "$kdeglobals" ]; then
135
-
kcminputrc="''${XDG_CONFIG_HOME}/kcminputrc"
136
-
if ! [ -f "$kcminputrc" ]; then
137
-
cat ${kcminputrc} >"$kcminputrc"
140
-
gtkrc2="$HOME/.gtkrc-2.0"
141
-
if ! [ -f "$gtkrc2" ]; then
142
-
cat ${gtkrc2} >"$gtkrc2"
145
-
gtk3_settings="''${XDG_CONFIG_HOME}/gtk-3.0/settings.ini"
146
-
if ! [ -f "$gtk3_settings" ]; then
147
-
mkdir -p "$(dirname "$gtk3_settings")"
148
-
cat ${gtk3_settings} >"$gtk3_settings"
···
# Update the start menu for each user that is currently logged in
system.userActivationScripts.plasmaSetup = activationScript;
477
-
services.xserver.displayManager.setupCommands = startplasma;
nixpkgs.config.firefox.enablePlasmaBrowserIntegration = true;