Option: added active desktop option which allows kde to be primary desktop environment.
This commit is contained in:
parent
d233e18593
commit
f622009e87
17 changed files with 82 additions and 60 deletions
|
|
@ -1,16 +1,37 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.niksos.desktop.enable && config.niksos.desktop.hyprland;
|
||||
inherit (config.niksos) desktop;
|
||||
cfg = desktop.enable && desktop.hyprland;
|
||||
active = cfg && desktop.activeDesktop == "hyprland";
|
||||
ifActive = x: lib.mkIf active x;
|
||||
in {
|
||||
config = lib.mkIf cfg {
|
||||
programs.hyprland = {
|
||||
specialisation.hyprland.configuration =
|
||||
lib.mkIf cfg
|
||||
&& !active {
|
||||
niksos.desktop.activeDesktop = lib.mkForce "hyprland";
|
||||
};
|
||||
|
||||
programs = ifActive {
|
||||
hyprland = {
|
||||
enable = true;
|
||||
withUWSM = true;
|
||||
};
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1"; # Makes electron apps use wayland.
|
||||
uwsm.enable = true;
|
||||
};
|
||||
|
||||
services.greetd.settings = let
|
||||
session = {
|
||||
command = "${lib.getExe config.programs.uwsm.package} start hyprland-uwsm.desktop";
|
||||
user = "jsw";
|
||||
};
|
||||
in
|
||||
ifActive {
|
||||
default_session = session;
|
||||
initial_session = session;
|
||||
};
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = ifActive "1"; # Makes electron apps use wayland.
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue