try to fix plasma6

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

View File

@ -56,10 +56,10 @@ inputs:
nvidia = inputs.lib.mkIf (builtins.elem "nvidia" gpus)
{
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.enable = false;
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,31 +6,26 @@ 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 (builtins) map;
inherit (inputs.lib) mkIf;
inherit (inputs.config.nixos.system) gui;
in mkIf gui.enable
config = let inherit (inputs.config.nixos.system) gui; in inputs.lib.mkIf gui.enable
{
services =
{
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; };
displayManager = { sddm = { enable = true; wayland.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; };
};
}