diff options
Diffstat (limited to 'nixpkgs/nixos/modules/services/x11/desktop-managers/plasma5.nix')
-rw-r--r-- | nixpkgs/nixos/modules/services/x11/desktop-managers/plasma5.nix | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/nixpkgs/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixpkgs/nixos/modules/services/x11/desktop-managers/plasma5.nix index d8dc2675f068..11cb4d3b8a95 100644 --- a/nixpkgs/nixos/modules/services/x11/desktop-managers/plasma5.nix +++ b/nixpkgs/nixos/modules/services/x11/desktop-managers/plasma5.nix @@ -13,7 +13,6 @@ let pulseaudio = config.hardware.pulseaudio; pactl = "${getBin pulseaudio.package}/bin/pactl"; - startplasma-x11 = "${getBin plasma5.plasma-workspace}/bin/startplasma-x11"; sed = "${getBin pkgs.gnused}/bin/sed"; gtkrc2 = writeText "gtkrc-2.0" '' @@ -136,9 +135,6 @@ let fi fi - '' - + '' - exec "${startplasma-x11}" ''; in @@ -172,6 +168,12 @@ in disabled by default. ''; }; + + useQtScaling = mkOption { + type = types.bool; + default = false; + description = "Enable HiDPI scaling in Qt."; + }; }; }; @@ -183,6 +185,7 @@ in config = mkMerge [ (mkIf cfg.enable { + # Seed our configuration into nixos-generate-config system.nixos-generate-config.desktopConfiguration = ['' # Enable the Plasma 5 Desktop Environment. @@ -190,11 +193,7 @@ in services.xserver.desktopManager.plasma5.enable = true; '']; - services.xserver.desktopManager.session = singleton { - name = "plasma5"; - bgSupport = true; - start = startplasma; - }; + services.xserver.displayManager.sessionPackages = [ pkgs.libsForQt5.plasma5.plasma-workspace ]; security.wrappers = { kcheckpass = @@ -264,6 +263,7 @@ in kwallet-pam kwalletmanager kwayland + kwayland-integration kwidgetsaddons kxmlgui kxmlrpcclient @@ -319,6 +319,10 @@ in qtvirtualkeyboard pkgs.xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/ + + elisa + gwenview + okular ] # Phonon audio backend @@ -342,6 +346,8 @@ in environment.etc."X11/xkb".source = xcfg.xkbDir; + environment.sessionVariables.PLASMA_USE_QT_SCALING = mkIf cfg.useQtScaling "1"; + # Enable GTK applications to load SVG icons services.xserver.gdk-pixbuf.modulePackages = [ pkgs.librsvg ]; @@ -384,6 +390,7 @@ 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; }) |