add qtct for qt application

This commit is contained in:
ulic-youthlic 2025-03-10 00:24:32 +08:00
parent a2e3094276
commit 6258eec747
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
2 changed files with 43 additions and 0 deletions

View file

@ -30,6 +30,43 @@ in
wl-clipboard
cliphist
];
qt = {
enable = true;
};
xdg.portal = {
configPackages = [ pkgs.niri-unstable ];
config = {
common = {
default = [
"cosmic"
];
};
};
enable = true;
extraPortals = lib.mkIf (
!pkgs.niri-unstable.cargoBuildNoDefaultFeatures
|| builtins.elem "xdp-gnome-screencast" pkgs.niri-unstable.cargoBuildFeatures
) [ pkgs.xdg-desktop-portal-gnome ];
};
xdg.configFile =
let
qtctConf =
''
[Appearance]
standard_dialogs=xdgdesktopportal
''
+ lib.optionalString (config.qt.style ? name) ''
style=${config.qt.style.name}
'';
in
{
"qt5ct/qt5ct.conf" = lib.mkForce {
text = qtctConf;
};
"qt6ct/qt6ct.conf" = lib.mkForce {
text = qtctConf;
};
};
youthlic.programs = {
fuzzel.enable = true;
wluma.enable = true;

View file

@ -9,9 +9,15 @@ let
in
{
config = lib.mkIf (cfg.enabled == "niri") {
qt = {
enable = true;
platformTheme = "qt5ct";
};
environment.systemPackages = with pkgs; [
bluez
cosmic-files
kdePackages.qt6ct
libsForQt5.qt5ct
];
xdg.mime = {
enable = true;