Skip to content

Better QT and GTK theming#232

Draft
danxliu wants to merge 29 commits intomainfrom
icon-theme
Draft

Better QT and GTK theming#232
danxliu wants to merge 29 commits intomainfrom
icon-theme

Conversation

@danxliu
Copy link
Copy Markdown
Contributor

@danxliu danxliu commented Apr 2, 2026

  • Analyze PR state and review comments
  • Fix unquoted path variables in sed/ln commands in the cosmictheme-dark service script
  • Guard KVANTUM_THEME_FILE initialization for existing users, with smart theme default based on OCF theme preference
  • Final code review and security scan

danxliu and others added 19 commits April 1, 2026 19:06
* use openssh_gssapi for sshd on all hosts

* GSSAPIKeyExchange = yes if host has a keytab

* test an option

* ticket forwarding flag

* undo unhelpful option

* test without specifying openssh package

* implement oliver suggestions

---------

Co-authored-by: 24apricots <michaelzls@berkeley.edu>
* gh actions: make build workflow actually build

`--evaluator streaming` would be preferable, but it results in colmena
exiting as successful after 2 seconds without doing anything, even if
nix-eval-jobs is installed.

* gh actions: enable verbose builds

* fix eval warning on builds

fixes the remaining evaluation warnings for:
'system' has been renamed to/replaced by 'stdenv.hostPlatform.system'
@danxliu danxliu requested a review from Copilot April 2, 2026 23:26
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the graphical NixOS profile and skel configuration to improve consistent theming across Qt and GTK apps in COSMIC, including reacting to light/dark mode changes and respecting an existing OCF theme setting at startup.

Changes:

  • Add default qt5ct/qt6ct configuration in skel and enable COSMIC Tk global theme application.
  • Install Qt/GTK theme packages and enable xdg-desktop-portal-gtk.
  • Extend the COSMIC theme watcher to sync Qt style (qt5ct/qt6ct) and seed COSMIC theme from the persisted OCF theme on startup; add a new nixpkgs-unstable flake input.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
modules/graphical/skel/.config/qt6ct/qt6ct.conf Adds default Qt6ct appearance settings (icon theme, dialogs, style).
modules/graphical/skel/.config/qt5ct/qt5ct.conf Adds default Qt5ct appearance settings (icon theme, dialogs, style).
modules/graphical/skel/.config/cosmic/com.system76.CosmicTk/v1/apply_theme_global Enables COSMIC Tk global theme application in skel.
modules/graphical/default.nix Enables xdg portal GTK, installs theming packages, sets Qt platform theme env var, and syncs Qt style on theme changes.
flake.nix Adds a nixpkgs-unstable flake input.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +157 to +158
preferences = {
"widget.gtk.libadwaita-colors.enabled" = false;
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

programs.firefox.preferences doesn't appear to be a valid NixOS option in this repo (other Firefox config uses programs.firefox.policies.Preferences). As written, this is likely to fail evaluation with “option does not exist”. Consider moving this setting under programs.firefox.policies.Preferences (with the expected { Value = ...; Status = ...; } structure) or using the existing browsers module to carry this preference.

Suggested change
preferences = {
"widget.gtk.libadwaita-colors.enabled" = false;
policies.Preferences = {
"widget.gtk.libadwaita-colors.enabled" = {
Value = false;
Status = "default";
};

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

];

environment.sessionVariables = {
QT_QPA_PLATFORMTHEME = "qt5ct";
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QT_QPA_PLATFORMTHEME is set to qt5ct, but this PR also installs/configures qt6ct. With the current env var, Qt6 apps typically won't load the qt6ct platform theme plugin, so the ~/.config/qt6ct/qt6ct.conf changes may never take effect. Please adjust the session environment (or use wrappers) so both Qt5 and Qt6 apps pick up the intended theming.

Suggested change
QT_QPA_PLATFORMTHEME = "qt5ct";
QT_QPA_PLATFORMTHEME = "gtk3";

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hallucination

Comment on lines +262 to +266
sed -i -E 's/bg-(light|dark)/bg-dark/g' $COSMIC_BG_FILE
sed -i 's/theme = "rose-pine-dawn"/theme = "rose-pine"/' $HOME/.config/halloy/config.toml
# QT Themes
sed -i 's/^style=.*/style=Adwaita-Dark/' $QT5CT_THEME_FILE
sed -i 's/^style=.*/style=Adwaita-Dark/' $QT6CT_THEME_FILE
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sed -i invocations use unquoted path variables (e.g. $COSMIC_BG_FILE, $QT5CT_THEME_FILE, $QT6CT_THEME_FILE). This can break on unexpected characters and also produces noisy errors if the target files don't exist (common for existing users who don't have the new skel files). Quote these paths and guard/initialize the qt5ct/qt6ct config files before editing so the theme sync is reliable.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

flake.nix Outdated
Comment on lines +109 to +115

nixpkgs-unstable = {
type = "github";
owner = "nixos";
repo = "nixpkgs";
ref = "nixos-unstable";
};
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new flake input (nixpkgs-unstable) was added, but flake.lock does not contain a corresponding node (verified by searching flake.lock). This will break nix commands that require a locked input set. Please run nix flake lock --update-input nixpkgs-unstable (and commit the lockfile change) or drop the input if it's not needed yet.

Suggested change
nixpkgs-unstable = {
type = "github";
owner = "nixos";
repo = "nixpkgs";
ref = "nixos-unstable";
};

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@danxliu
Copy link
Copy Markdown
Contributor Author

danxliu commented Apr 3, 2026

@copilot review please

@danxliu
Copy link
Copy Markdown
Contributor Author

danxliu commented Apr 3, 2026

@waddles review please

Copy link
Copy Markdown

Copilot AI commented Apr 3, 2026

@copilot review please

Reviewed the current state of the PR. Found and fixed these issues in commit 6abd8ae:

  1. Unquoted path variables$COSMIC_BG_FILE, $KVANTUM_THEME_FILE, and $HOME/.config/halloy/config.toml were all unquoted in sed commands, and $HOME/.config/Kvantum/... paths were unquoted in ln commands. All are now properly quoted.

  2. KVANTUM_THEME_FILE missing for existing users — The skel file is only copied for new home directories, so existing users wouldn't have ~/.config/Kvantum/kvantum.kvconfig. Added a guard that initializes it if missing, using the OCF theme preference (rose-pine-dawn-iris for light, rose-pine-moon-iris for dark) as the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants