Revert "try to fix plasma6"

This reverts commit 22464c272a.
This commit is contained in:
陈浩南 2024-05-25 19:25:30 +08:00
parent 22464c272a
commit b492c82b45
2 changed files with 27 additions and 22 deletions

View File

@ -56,10 +56,10 @@ inputs:
nvidia = inputs.lib.mkIf (builtins.elem "nvidia" gpus)
{
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.enable = true;
dynamicBoost.enable = inputs.lib.mkIf gpu.dynamicBoost true;
nvidiaSettings = true;
# forceFullCompositionPipeline = true;
forceFullCompositionPipeline = true;
# package = inputs.config.boot.kernelPackages.nvidiaPackages.production;
prime.allowExternalGpu = true;
};

View File

@ -6,26 +6,31 @@ inputs:
preferred = mkOption { type = types.bool; default = inputs.config.nixos.system.gui.enable; };
autoStart = mkOption { type = types.bool; default = inputs.config.nixos.system.gui.preferred; };
};
config = let inherit (inputs.config.nixos.system) gui; in inputs.lib.mkIf gui.enable
{
services =
config =
let
inherit (builtins) map;
inherit (inputs.lib) mkIf;
inherit (inputs.config.nixos.system) gui;
in mkIf gui.enable
{
displayManager = { sddm = { enable = true; wayland.enable = true; }; defaultSession = "plasma"; };
desktopManager.plasma6.enable = true;
xserver.enable = true;
services =
{
displayManager = { sddm.enable = true; defaultSession = "plasma"; };
desktopManager.plasma6.enable = true;
xserver.enable = true;
};
systemd.services.display-manager.enable = gui.autoStart;
environment =
{
sessionVariables."GTK_USE_PORTAL" = "1";
plasma6.excludePackages = inputs.lib.mkIf (!gui.preferred) [ inputs.pkgs.kdePackages.plasma-nm ];
};
xdg.portal.extraPortals = map (p: inputs.pkgs."xdg-desktop-portal-${p}") [ "gtk" "kde" "wlr" ];
i18n.inputMethod =
{
enabled = "fcitx5";
fcitx5.addons = map (p: inputs.pkgs."fcitx5-${p}") [ "rime" "chinese-addons" "mozc" "nord" "material-color" ];
};
programs = { dconf.enable = true; xwayland.enable = true; };
};
systemd.services.display-manager.enable = gui.autoStart;
environment =
{
sessionVariables."GTK_USE_PORTAL" = "1";
plasma6.excludePackages = inputs.lib.mkIf (!gui.preferred) [ inputs.pkgs.kdePackages.plasma-nm ];
};
xdg.portal.extraPortals = map (p: inputs.pkgs."xdg-desktop-portal-${p}") [ "gtk" "kde" "wlr" ];
i18n.inputMethod =
{
enabled = "fcitx5";
fcitx5.addons = map (p: inputs.pkgs."fcitx5-${p}") [ "rime" "chinese-addons" "mozc" "nord" "material-color" ];
};
programs = { dconf.enable = true; xwayland.enable = true; };
};
}