2020-04-24 23:36:52 +00:00
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
|
|
let
|
|
|
|
|
xcfg = config.services.xserver;
|
|
|
|
|
cfg = xcfg.desktopManager.plasma5;
|
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
|
libsForQt5 = pkgs.plasma5Packages;
|
2021-05-28 09:39:13 +00:00
|
|
|
|
inherit (libsForQt5) kdeGear kdeFrameworks plasma5;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
inherit (pkgs) writeText;
|
2021-10-28 06:52:43 +00:00
|
|
|
|
inherit (lib)
|
|
|
|
|
getBin optionalString
|
|
|
|
|
mkRemovedOptionModule mkRenamedOptionModule
|
|
|
|
|
mkDefault mkIf mkMerge mkOption types;
|
|
|
|
|
|
|
|
|
|
ini = pkgs.formats.ini { };
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
pulseaudio = config.hardware.pulseaudio;
|
|
|
|
|
pactl = "${getBin pulseaudio.package}/bin/pactl";
|
|
|
|
|
sed = "${getBin pkgs.gnused}/bin/sed";
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
'';
|
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
|
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;
|
|
|
|
|
};
|
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
|
kcminputrc = ini.generate "kcminputrc" {
|
|
|
|
|
Mouse = {
|
|
|
|
|
cursorTheme = "breeze_cursors";
|
|
|
|
|
cursorSize = 0;
|
|
|
|
|
};
|
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
activationScript = ''
|
|
|
|
|
${set_XDG_CONFIG_HOME}
|
|
|
|
|
|
|
|
|
|
# The KDE icon cache is supposed to update itself automatically, but it uses
|
|
|
|
|
# the timestamp on the icon theme directory as a trigger. This doesn't work
|
|
|
|
|
# on NixOS because the timestamp never changes. As a workaround, delete the
|
|
|
|
|
# icon cache at login and session activation.
|
|
|
|
|
# See also: http://lists-archives.org/kde-devel/26175-what-when-will-icon-cache-refresh.html
|
|
|
|
|
rm -fv $HOME/.cache/icon-cache.kcache
|
|
|
|
|
|
|
|
|
|
# xdg-desktop-settings generates this empty file but
|
|
|
|
|
# it makes kbuildsyscoca5 fail silently. To fix this
|
|
|
|
|
# remove that menu if it exists.
|
|
|
|
|
rm -fv ''${XDG_CONFIG_HOME}/menus/applications-merged/xdg-desktop-menu-dummy.menu
|
|
|
|
|
|
|
|
|
|
# Qt writes a weird ‘libraryPath’ line to
|
|
|
|
|
# ~/.config/Trolltech.conf that causes the KDE plugin
|
|
|
|
|
# paths of previous KDE invocations to be searched.
|
|
|
|
|
# Obviously using mismatching KDE libraries is potentially
|
|
|
|
|
# disastrous, so here we nuke references to the Nix store
|
|
|
|
|
# in Trolltech.conf. A better solution would be to stop
|
|
|
|
|
# Qt from doing this wackiness in the first place.
|
|
|
|
|
trolltech_conf="''${XDG_CONFIG_HOME}/Trolltech.conf"
|
|
|
|
|
if [ -e "$trolltech_conf" ]; then
|
|
|
|
|
${sed} -i "$trolltech_conf" -e '/nix\\store\|nix\/store/ d'
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Remove the kbuildsyscoca5 cache. It will be regenerated
|
|
|
|
|
# immediately after. This is necessary for kbuildsyscoca5 to
|
|
|
|
|
# recognize that software that has been removed.
|
|
|
|
|
rm -fv $HOME/.cache/ksycoca*
|
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
|
${libsForQt5.kservice}/bin/kbuildsycoca5
|
2020-04-24 23:36:52 +00:00
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
set_XDG_CONFIG_HOME = ''
|
2021-10-28 06:52:43 +00:00
|
|
|
|
# Set the default XDG_CONFIG_HOME if it is unset.
|
|
|
|
|
# Per the XDG Base Directory Specification:
|
|
|
|
|
# https://specifications.freedesktop.org/basedir-spec/latest
|
|
|
|
|
# 1. Never export this variable! If it is unset, then child processes are
|
|
|
|
|
# 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}
|
2020-04-24 23:36:52 +00:00
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
startplasma =
|
|
|
|
|
''
|
|
|
|
|
${set_XDG_CONFIG_HOME}
|
|
|
|
|
mkdir -p "''${XDG_CONFIG_HOME}"
|
|
|
|
|
|
|
|
|
|
''
|
|
|
|
|
+ optionalString 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/
|
|
|
|
|
${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"
|
2021-10-28 06:52:43 +00:00
|
|
|
|
if ! [ -f "$kcminputrc" ]; then
|
2020-04-24 23:36:52 +00:00
|
|
|
|
cat ${kcminputrc} >"$kcminputrc"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
gtkrc2="$HOME/.gtkrc-2.0"
|
2021-10-28 06:52:43 +00:00
|
|
|
|
if ! [ -f "$gtkrc2" ]; then
|
2020-04-24 23:36:52 +00:00
|
|
|
|
cat ${gtkrc2} >"$gtkrc2"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
gtk3_settings="''${XDG_CONFIG_HOME}/gtk-3.0/settings.ini"
|
2021-10-28 06:52:43 +00:00
|
|
|
|
if ! [ -f "$gtk3_settings" ]; then
|
2020-04-24 23:36:52 +00:00
|
|
|
|
mkdir -p "$(dirname "$gtk3_settings")"
|
|
|
|
|
cat ${gtk3_settings} >"$gtk3_settings"
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
|
|
{
|
2021-10-28 06:52:43 +00:00
|
|
|
|
options.services.xserver.desktopManager.plasma5 = {
|
|
|
|
|
enable = mkOption {
|
|
|
|
|
type = types.bool;
|
|
|
|
|
default = false;
|
|
|
|
|
description = "Enable the Plasma 5 (KDE 5) desktop environment.";
|
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
|
phononBackend = mkOption {
|
|
|
|
|
type = types.enum [ "gstreamer" "vlc" ];
|
|
|
|
|
default = "gstreamer";
|
|
|
|
|
example = "vlc";
|
|
|
|
|
description = "Phonon audio backend to install.";
|
|
|
|
|
};
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
|
supportDDC = mkOption {
|
|
|
|
|
type = types.bool;
|
|
|
|
|
default = false;
|
|
|
|
|
description = ''
|
|
|
|
|
Support setting monitor brightness via DDC.
|
|
|
|
|
</para>
|
|
|
|
|
<para>
|
|
|
|
|
This is not needed for controlling brightness of the internal monitor
|
|
|
|
|
of a laptop and as it is considered experimental by upstream, it is
|
|
|
|
|
disabled by default.
|
|
|
|
|
'';
|
|
|
|
|
};
|
2021-10-17 02:12:59 +00:00
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
|
useQtScaling = mkOption {
|
|
|
|
|
type = types.bool;
|
|
|
|
|
default = false;
|
|
|
|
|
description = "Enable HiDPI scaling in Qt.";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
|
runUsingSystemd = mkOption {
|
|
|
|
|
description = "Use systemd to manage the Plasma session";
|
|
|
|
|
type = types.bool;
|
|
|
|
|
default = false;
|
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
imports = [
|
|
|
|
|
(mkRemovedOptionModule [ "services" "xserver" "desktopManager" "plasma5" "enableQt4Support" ] "Phonon no longer supports Qt 4.")
|
|
|
|
|
(mkRenamedOptionModule [ "services" "xserver" "desktopManager" "kde5" ] [ "services" "xserver" "desktopManager" "plasma5" ])
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
config = mkMerge [
|
|
|
|
|
(mkIf cfg.enable {
|
2021-10-17 02:12:59 +00:00
|
|
|
|
|
2020-10-27 00:29:36 +00:00
|
|
|
|
# Seed our configuration into nixos-generate-config
|
2021-10-28 06:52:43 +00:00
|
|
|
|
system.nixos-generate-config.desktopConfiguration = [
|
|
|
|
|
''
|
|
|
|
|
# Enable the Plasma 5 Desktop Environment.
|
|
|
|
|
services.xserver.displayManager.sddm.enable = true;
|
|
|
|
|
services.xserver.desktopManager.plasma5.enable = true;
|
|
|
|
|
''
|
|
|
|
|
];
|
2020-10-27 00:29:36 +00:00
|
|
|
|
|
2021-10-17 02:12:59 +00:00
|
|
|
|
services.xserver.displayManager.sessionPackages = [ pkgs.libsForQt5.plasma5.plasma-workspace ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
security.wrappers = {
|
2021-09-22 15:38:15 +00:00
|
|
|
|
kcheckpass =
|
2021-10-28 06:52:43 +00:00
|
|
|
|
{
|
|
|
|
|
setuid = true;
|
2021-09-22 15:38:15 +00:00
|
|
|
|
owner = "root";
|
|
|
|
|
group = "root";
|
2021-10-28 06:52:43 +00:00
|
|
|
|
source = "${getBin libsForQt5.kscreenlocker}/libexec/kcheckpass";
|
2021-09-22 15:38:15 +00:00
|
|
|
|
};
|
|
|
|
|
start_kdeinit =
|
2021-10-28 06:52:43 +00:00
|
|
|
|
{
|
|
|
|
|
setuid = true;
|
2021-09-22 15:38:15 +00:00
|
|
|
|
owner = "root";
|
|
|
|
|
group = "root";
|
2021-10-28 06:52:43 +00:00
|
|
|
|
source = "${getBin libsForQt5.kinit}/libexec/kf5/start_kdeinit";
|
2021-09-22 15:38:15 +00:00
|
|
|
|
};
|
|
|
|
|
kwin_wayland =
|
2021-10-28 06:52:43 +00:00
|
|
|
|
{
|
|
|
|
|
owner = "root";
|
2021-09-22 15:38:15 +00:00
|
|
|
|
group = "root";
|
|
|
|
|
capabilities = "cap_sys_nice+ep";
|
2021-10-28 06:52:43 +00:00
|
|
|
|
source = "${getBin plasma5.kwin}/bin/kwin_wayland";
|
2021-09-22 15:38:15 +00:00
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
|
# DDC support
|
|
|
|
|
boot.kernelModules = lib.optional cfg.supportDDC "i2c_dev";
|
|
|
|
|
services.udev.extraRules = lib.optionalString cfg.supportDDC ''
|
|
|
|
|
KERNEL=="i2c-[0-9]*", TAG+="uaccess"
|
|
|
|
|
'';
|
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
|
environment.systemPackages =
|
2021-02-05 17:12:51 +00:00
|
|
|
|
with libsForQt5;
|
2021-05-28 09:39:13 +00:00
|
|
|
|
with plasma5; with kdeGear; with kdeFrameworks;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
[
|
|
|
|
|
frameworkintegration
|
|
|
|
|
kactivities
|
|
|
|
|
kauth
|
|
|
|
|
kcmutils
|
|
|
|
|
kconfig
|
|
|
|
|
kconfigwidgets
|
|
|
|
|
kcoreaddons
|
|
|
|
|
kdoctools
|
|
|
|
|
kdbusaddons
|
|
|
|
|
kdeclarative
|
|
|
|
|
kded
|
|
|
|
|
kdesu
|
|
|
|
|
kdnssd
|
|
|
|
|
kemoticons
|
|
|
|
|
kfilemetadata
|
|
|
|
|
kglobalaccel
|
|
|
|
|
kguiaddons
|
|
|
|
|
kiconthemes
|
|
|
|
|
kidletime
|
|
|
|
|
kimageformats
|
|
|
|
|
kinit
|
2021-10-28 06:52:43 +00:00
|
|
|
|
kirigami2 # In system profile for SDDM theme. TODO: wrapper.
|
2020-04-24 23:36:52 +00:00
|
|
|
|
kio
|
|
|
|
|
kjobwidgets
|
|
|
|
|
knewstuff
|
|
|
|
|
knotifications
|
|
|
|
|
knotifyconfig
|
|
|
|
|
kpackage
|
|
|
|
|
kparts
|
|
|
|
|
kpeople
|
|
|
|
|
krunner
|
|
|
|
|
kservice
|
|
|
|
|
ktextwidgets
|
|
|
|
|
kwallet
|
|
|
|
|
kwallet-pam
|
|
|
|
|
kwalletmanager
|
|
|
|
|
kwayland
|
2021-10-01 09:20:50 +00:00
|
|
|
|
kwayland-integration
|
2020-04-24 23:36:52 +00:00
|
|
|
|
kwidgetsaddons
|
|
|
|
|
kxmlgui
|
|
|
|
|
kxmlrpcclient
|
|
|
|
|
plasma-framework
|
|
|
|
|
solid
|
|
|
|
|
sonnet
|
|
|
|
|
threadweaver
|
|
|
|
|
|
|
|
|
|
breeze-qt5
|
|
|
|
|
kactivitymanagerd
|
|
|
|
|
kde-cli-tools
|
|
|
|
|
kdecoration
|
|
|
|
|
kdeplasma-addons
|
|
|
|
|
kgamma5
|
|
|
|
|
khotkeys
|
|
|
|
|
kinfocenter
|
|
|
|
|
kmenuedit
|
|
|
|
|
kscreen
|
|
|
|
|
kscreenlocker
|
2021-08-05 21:33:18 +00:00
|
|
|
|
ksystemstats
|
2020-04-24 23:36:52 +00:00
|
|
|
|
kwayland
|
|
|
|
|
kwin
|
|
|
|
|
kwrited
|
|
|
|
|
libkscreen
|
|
|
|
|
libksysguard
|
|
|
|
|
milou
|
2021-08-05 21:33:18 +00:00
|
|
|
|
plasma-systemmonitor
|
2020-04-24 23:36:52 +00:00
|
|
|
|
plasma-browser-integration
|
|
|
|
|
plasma-integration
|
|
|
|
|
polkit-kde-agent
|
2020-10-07 09:15:18 +00:00
|
|
|
|
spectacle
|
2020-04-24 23:36:52 +00:00
|
|
|
|
systemsettings
|
|
|
|
|
|
|
|
|
|
plasma-desktop
|
|
|
|
|
plasma-workspace
|
|
|
|
|
plasma-workspace-wallpapers
|
|
|
|
|
|
|
|
|
|
dolphin
|
|
|
|
|
dolphin-plugins
|
|
|
|
|
ffmpegthumbs
|
|
|
|
|
kdegraphics-thumbnailers
|
|
|
|
|
khelpcenter
|
|
|
|
|
kio-extras
|
|
|
|
|
konsole
|
|
|
|
|
oxygen
|
|
|
|
|
print-manager
|
|
|
|
|
|
|
|
|
|
breeze-icons
|
|
|
|
|
pkgs.hicolor-icon-theme
|
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
|
kde-gtk-config
|
|
|
|
|
breeze-gtk
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
qtvirtualkeyboard
|
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
|
pkgs.xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/
|
2021-10-04 12:37:57 +00:00
|
|
|
|
|
|
|
|
|
elisa
|
|
|
|
|
gwenview
|
|
|
|
|
okular
|
2020-04-24 23:36:52 +00:00
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
# Phonon audio backend
|
|
|
|
|
++ lib.optional (cfg.phononBackend == "gstreamer") libsForQt5.phonon-backend-gstreamer
|
|
|
|
|
++ lib.optional (cfg.phononBackend == "vlc") libsForQt5.phonon-backend-vlc
|
|
|
|
|
|
|
|
|
|
# Optional hardware support features
|
2020-09-25 04:45:31 +00:00
|
|
|
|
++ lib.optionals config.hardware.bluetooth.enable [ bluedevil bluez-qt pkgs.openobex pkgs.obexftp ]
|
2020-04-24 23:36:52 +00:00
|
|
|
|
++ lib.optional config.networking.networkmanager.enable plasma-nm
|
|
|
|
|
++ lib.optional config.hardware.pulseaudio.enable plasma-pa
|
2021-05-28 09:39:13 +00:00
|
|
|
|
++ lib.optional config.services.pipewire.pulse.enable plasma-pa
|
2020-04-24 23:36:52 +00:00
|
|
|
|
++ lib.optional config.powerManagement.enable powerdevil
|
2020-09-25 04:45:31 +00:00
|
|
|
|
++ lib.optional config.services.colord.enable pkgs.colord-kde
|
2021-10-28 06:52:43 +00:00
|
|
|
|
++ lib.optional config.services.hardware.bolt.enable pkgs.plasma5Packages.plasma-thunderbolt
|
2020-04-24 23:36:52 +00:00
|
|
|
|
++ lib.optionals config.services.samba.enable [ kdenetwork-filesharing pkgs.samba ]
|
2020-09-25 04:45:31 +00:00
|
|
|
|
++ lib.optional config.services.xserver.wacom.enable pkgs.wacomtablet;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
environment.pathsToLink = [
|
|
|
|
|
# FIXME: modules should link subdirs of `/share` rather than relying on this
|
|
|
|
|
"/share"
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
environment.etc."X11/xkb".source = xcfg.xkbDir;
|
|
|
|
|
|
2021-10-17 02:12:59 +00:00
|
|
|
|
environment.sessionVariables.PLASMA_USE_QT_SCALING = mkIf cfg.useQtScaling "1";
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
# Enable GTK applications to load SVG icons
|
|
|
|
|
services.xserver.gdk-pixbuf.modulePackages = [ pkgs.librsvg ];
|
|
|
|
|
|
|
|
|
|
fonts.fonts = with pkgs; [ noto-fonts hack-font ];
|
|
|
|
|
fonts.fontconfig.defaultFonts = {
|
2020-07-18 16:06:22 +00:00
|
|
|
|
monospace = [ "Hack" "Noto Sans Mono" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
sansSerif = [ "Noto Sans" ];
|
|
|
|
|
serif = [ "Noto Serif" ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
programs.ssh.askPassword = mkDefault "${plasma5.ksshaskpass.out}/bin/ksshaskpass";
|
|
|
|
|
|
|
|
|
|
# Enable helpful DBus services.
|
|
|
|
|
services.udisks2.enable = true;
|
|
|
|
|
services.upower.enable = config.powerManagement.enable;
|
|
|
|
|
services.system-config-printer.enable = (mkIf config.services.printing.enable (mkDefault true));
|
|
|
|
|
services.xserver.libinput.enable = mkDefault true;
|
|
|
|
|
|
|
|
|
|
# Extra UDEV rules used by Solid
|
|
|
|
|
services.udev.packages = [
|
|
|
|
|
pkgs.libmtp
|
|
|
|
|
pkgs.media-player-info
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
services.xserver.displayManager.sddm = {
|
|
|
|
|
theme = mkDefault "breeze";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
security.pam.services.kde = { allowNullPassword = true; };
|
|
|
|
|
|
|
|
|
|
# Doing these one by one seems silly, but we currently lack a better
|
|
|
|
|
# construct for handling common pam configs.
|
|
|
|
|
security.pam.services.gdm.enableKwallet = true;
|
|
|
|
|
security.pam.services.kdm.enableKwallet = true;
|
|
|
|
|
security.pam.services.lightdm.enableKwallet = true;
|
|
|
|
|
security.pam.services.sddm.enableKwallet = true;
|
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
|
systemd.user.services = {
|
|
|
|
|
plasma-early-setup = mkIf cfg.runUsingSystemd {
|
|
|
|
|
description = "Early Plasma setup";
|
|
|
|
|
wantedBy = [ "graphical-session-pre.target" ];
|
|
|
|
|
serviceConfig.Type = "oneshot";
|
|
|
|
|
script = activationScript;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
plasma-run-with-systemd = {
|
|
|
|
|
description = "Run KDE Plasma via systemd";
|
|
|
|
|
wantedBy = [ "basic.target" ];
|
|
|
|
|
serviceConfig.Type = "oneshot";
|
|
|
|
|
script = ''
|
|
|
|
|
${set_XDG_CONFIG_HOME}
|
|
|
|
|
|
|
|
|
|
${kdeFrameworks.kconfig}/bin/kwriteconfig5 \
|
|
|
|
|
--file startkderc --group General --key systemdBoot ${lib.boolToString cfg.runUsingSystemd}
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
xdg.portal.enable = true;
|
2020-11-12 09:05:59 +00:00
|
|
|
|
xdg.portal.extraPortals = [ plasma5.xdg-desktop-portal-kde ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# Update the start menu for each user that is currently logged in
|
|
|
|
|
system.userActivationScripts.plasmaSetup = activationScript;
|
2021-10-17 02:12:59 +00:00
|
|
|
|
services.xserver.displayManager.setupCommands = startplasma;
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
|
|
nixpkgs.config.firefox.enablePlasmaBrowserIntegration = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
})
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
}
|