Skip to content

Commit

Permalink
Merge pull request #292141 from SuperSandro2000/plasma-out-xserver
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 authored Mar 12, 2024
2 parents 21adc4f + b07cdeb commit e220724
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
utils,
...
}: let
xcfg = config.services.xserver;
cfg = xcfg.desktopManager.plasma6;
cfg = config.services.desktopManager.plasma6;

inherit (pkgs) kdePackages;
inherit (lib) literalExpression mkDefault mkIf mkOption mkPackageOptionMD types;
Expand All @@ -17,7 +16,7 @@
'';
in {
options = {
services.xserver.desktopManager.plasma6 = {
services.desktopManager.plasma6 = {
enable = mkOption {
type = types.bool;
default = false;
Expand All @@ -44,6 +43,12 @@ in {
};
};

imports = [
(lib.mkRenamedOptionModule [ "services" "xserver" "desktopManager" "plasma6" "enable" ] [ "services" "desktopManager" "plasma6" "enable" ])
(lib.mkRenamedOptionModule [ "services" "xserver" "desktopManager" "plasma6" "enableQt5Integration" ] [ "services" "desktopManager" "plasma6" "enableQt5Integration" ])
(lib.mkRenamedOptionModule [ "services" "xserver" "desktopManager" "plasma6" "notoPackage" ] [ "services" "desktopManager" "plasma6" "notoPackage" ])
];

config = mkIf cfg.enable {
assertions = [
{
Expand Down Expand Up @@ -161,7 +166,7 @@ in {
in
requiredPackages
++ utils.removePackagesByName optionalPackages config.environment.plasma6.excludePackages
++ lib.optionals config.services.xserver.desktopManager.plasma6.enableQt5Integration [
++ lib.optionals config.services.desktopManager.plasma6.enableQt5Integration [
breeze.qt5
plasma-integration.qt5
pkgs.plasma5Packages.kwayland-integration
Expand All @@ -185,7 +190,7 @@ in {
"/libexec" # for drkonqi
];

environment.etc."X11/xkb".source = xcfg.xkb.dir;
environment.etc."X11/xkb".source = config.services.xserver.xkb.dir;

# Add ~/.config/kdedefaults to XDG_CONFIG_DIRS for shells, since Plasma sets that.
# FIXME: maybe we should append to XDG_CONFIG_DIRS in /etc/set-environment instead?
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/x11/desktop-managers/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ in
# determines the default: later modules (if enabled) are preferred.
# E.g., if Plasma 5 is enabled, it supersedes xterm.
imports = [
./none.nix ./xterm.nix ./phosh.nix ./xfce.nix ./plasma5.nix ./plasma6.nix ./lumina.nix
./none.nix ./xterm.nix ./phosh.nix ./xfce.nix ./plasma5.nix ../../desktop-managers/plasma6.nix ./lumina.nix
./lxqt.nix ./enlightenment.nix ./gnome.nix ./retroarch.nix ./kodi.nix
./mate.nix ./pantheon.nix ./surf-display.nix ./cde.nix
./cinnamon.nix ./budgie.nix ./deepin.nix
Expand Down

0 comments on commit e220724

Please sign in to comment.