整理 gui

This commit is contained in:
2023-07-24 12:52:00 +08:00
parent c58284cb63
commit 32ae92be3c
4 changed files with 27 additions and 41 deletions

View File

@@ -237,7 +237,6 @@
./modules/basic.nix
./modules/fonts.nix
[ ./modules/i18n.nix { fcitx = true; } ]
./modules/kde.nix
./modules/sops.nix
./modules/boot/chn-PC.nix
[ ./modules/hardware/nvidia-prime.nix { intelBusId = "PCI:0:2:0"; nvidiaBusId = "PCI:1:0:0"; } ]

View File

@@ -1,20 +0,0 @@
{ fcitx }: inputs:
{
config.i18n =
{
defaultLocale = "zh_CN.UTF-8";
supportedLocales = ["zh_CN.UTF-8/UTF-8" "en_US.UTF-8/UTF-8" "C.UTF-8/UTF-8"];
}
//
(
if fcitx then
{
inputMethod =
{
enabled = "fcitx5";
fcitx5.addons = with inputs.pkgs; [ fcitx5-rime fcitx5-chinese-addons fcitx5-mozc ];
};
}
else {}
);
}

View File

@@ -1,20 +0,0 @@
inputs:
{
config =
{
services.xserver =
{
enable = true;
displayManager.sddm.enable = true;
desktopManager.plasma5.enable = true;
};
environment =
{
sessionVariables."GTK_USE_PORTAL" = "1";
systemPackages = [ inputs.pkgs.libsForQt5.qtstyleplugin-kvantum ];
};
xdg.portal.extraPortals = with inputs.pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-wlr ];
programs.xwayland.enable = true;
programs.kdeconnect.enable = true;
};
}

View File

@@ -95,6 +95,11 @@ inputs:
XDG_DATA_HOME = "$HOME/.local/share";
XDG_STATE_HOME = "$HOME/.local/state";
};
i18n =
{
defaultLocale = "zh_CN.UTF-8";
supportedLocales = ["zh_CN.UTF-8/UTF-8" "en_US.UTF-8/UTF-8" "C.UTF-8/UTF-8"];
};
}
# hostname
{ networking.hostName = inputs.config.nixos.system.hostname; }
@@ -123,5 +128,27 @@ inputs:
{ nixpkgs.hostPlatform = inputs.lib.mkDefault "x86_64-linux"; }
)
# gui.enable
(mkIf inputs.config.nixos.system.gui.enable
{
services.xserver =
{
enable = true;
displayManager.sddm.enable = true;
desktopManager.plasma5.enable = true;
};
environment =
{
sessionVariables."GTK_USE_PORTAL" = "1";
systemPackages = [ inputs.pkgs.libsForQt5.qtstyleplugin-kvantum ];
};
xdg.portal.extraPortals = with inputs.pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-wlr ];
programs.xwayland.enable = true;
programs.kdeconnect.enable = true;
i18n.inputMethod =
{
enabled = "fcitx5";
fcitx5.addons = with inputs.pkgs; [ fcitx5-rime fcitx5-chinese-addons fcitx5-mozc ];
};
})
];
}