Skip to content

Commit

Permalink
[Skeleton] oops.. mkMerge it is (laziness prohibited)
Browse files Browse the repository at this point in the history
  • Loading branch information
Icy-Thought committed Sep 27, 2024
1 parent b13d506 commit e69434f
Showing 1 changed file with 26 additions and 22 deletions.
48 changes: 26 additions & 22 deletions modules/desktop/skeleton/plasma.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,38 @@

let
inherit (lib.attrsets) attrValues;
inherit (lib.modules) mkIf;
inherit (lib.modules) mkIf mkMerge;
in {
options.modules.desktop.plasma = let inherit (lib.options) mkEnableOption;
in { enable = mkEnableOption "modern desktop environment"; };

config = mkIf config.modules.desktop.plasma.enable {
modules.desktop = {
type = "wayland";
extensions.input-method = {
enable = true;
framework = "fcitx5";
config = mkMerge [
(mkIf config.modules.desktop.plasma.enable {
modules.desktop = {
type = "wayland";
extensions.input-method = {
enable = true;
framework = "fcitx5";
};
};
};

services.desktopManager.plasma6 = {
enable = true;
enableQt5Integration = false;
};
services.greetd.settings.initial_session.command = "plasmawayland";
services.desktopManager.plasma6 = {
enable = true;
enableQt5Integration = false;
};
services.greetd.settings.initial_session.command = "plasmawayland";

environment.plasma6.excludePackages =
attrValues { inherit (pkgs.kdePackages) konsole oxygen; };
};
programs.dconf.enable = true;
environment.plasma6.excludePackages =
attrValues { inherit (pkgs.kdePackages) konsole oxygen; };
programs.dconf.enable = true;
})

environment.sessionVariables = mkIf (config.desktop.type == "wayland") {
ELECTRON_OZONE_PLATFORM_HINT = "auto";
NIXOS_OZONE_WL = "1";
MOZ_ENABLE_WAYLAND = "1";
};
(mkIf (config.modules.desktop.type == "wayland") {
environment.sessionVariables = {
ELECTRON_OZONE_PLATFORM_HINT = "auto";
NIXOS_OZONE_WL = "1";
MOZ_ENABLE_WAYLAND = "1";
};
})
];
}

0 comments on commit e69434f

Please sign in to comment.