Option: added active desktop option which allows kde to be primary desktop environment.

This commit is contained in:
Jurn Wubben 2025-07-09 19:48:10 +02:00
parent d233e18593
commit f622009e87
17 changed files with 82 additions and 60 deletions

View file

@ -4,25 +4,28 @@
config,
...
}: let
cfg = config.niksos.desktop.enable && config.niksos.desktop.kde;
inherit (config.niksos) desktop;
cfg = desktop.enable && desktop.kde;
active = cfg && desktop.activeDesktop == "kde";
ifActive = x: lib.mkIf active x;
in {
specialisation.de.configuration = lib.mkIf cfg {
niksos.desktop.hyprland = lib.mkForce false;
services = {
greetd = let
session.command = "${pkgs.kdePackages.plasma-workspace}/bin/startplasma-wayland";
in {
enable = true;
settings = {
terminal.vt = 1;
default_session = session;
initial_session = session;
};
};
desktopManager.plasma6.enable = true;
specialisation.kde.configuration =
lib.mkIf cfg
&& !active {
niksos.desktop.activeDesktop = lib.mkForce "kde";
};
home-manager.users.jsw.stylix.autoEnable = false;
services = ifActive {
greetd.settings = let
session.command = "${pkgs.kdePackages.plasma-workspace}/bin/startplasma-wayland";
in {
default_session = session;
initial_session = session;
};
desktopManager.plasma6.enable = true;
};
home-manager.users = ifActive {
jsw.stylix.autoEnable = false;
};
}