kdePackages: add signon-plugin-oauth2, signon-ui, signond wrapper, nixos/signond module#517355
Open
StarGate01 wants to merge 6 commits intoNixOS:masterfrom
Open
kdePackages: add signon-plugin-oauth2, signon-ui, signond wrapper, nixos/signond module#517355StarGate01 wants to merge 6 commits intoNixOS:masterfrom
StarGate01 wants to merge 6 commits intoNixOS:masterfrom
Conversation
Co-Authored-By: Marie Ramlow <me@nycode.dev>
Co-Authored-By: Christoph Honal <christoph.honal@web.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the missing pieces of the KDE Online Accounts / accounts-sso stack for Qt6. Once
services.signond.enable = trueis set, Google Drive becomes accessible via Dolphin and kio-gdrive on NixOS.What is added
kdePackages.signon-plugin-oauth2- OAuth 1.0/2.0 plugin for signond, pinned to the Qt6-support MR (!28) tipkdePackages.signon-ui- D-Bus daemon that opens the OAuth browser window during account loginkdePackages.signond- wraps the bare signond with a composable plugin list viasymlinkJoin, setsSSO_PLUGINS_DIR/SSO_EXTENSIONS_DIR, and patches the D-Bus.servicefile to point at the wrapper so D-Bus activation picks up the pluginsnixos/services/desktops/signond- new NixOS module (services.signond) withenable,package, andpluginsoptions; defaults tosignon-plugin-oauth2+signon-kwallet-extension; also registerssignon-uiinenvironment.systemPackagesso D-Bus can activate it when signond requests an auth UIkdePackages.kaccounts-providers- gainsgoogleClientId,googleClientSecret,withGoogleDriveScope, andwithYoutubeScopeoverride arguments for build-time credential and scope substitutionUsage
Enable the daemon and add the relevant packages to your system:
Then open System Settings → Online Accounts, add a Google account, and Google Drive will appear in Dolphin.
The packages are not added automatically because not every user wants kio-gdrive - the module's responsibility is only to run the daemon correctly.
Google Drive scope and custom OAuth credentials
The default KDE OAuth client is not approved by Google for Drive access.
kaccounts-providersexposes override arguments to substitute credentials and control which scopes are requested:googleClientId/googleClientSecret- replace the KDE OAuth app credentials with your ownwithGoogleDriveScope- add thedrivescope (defaultfalse)withYoutubeScope- keep theyoutube.uploadscope (defaulttrue)These are build-time substitutions into
google.provider, so they are package override arguments, not NixOS module options. Apply them via an overlay:The KDE credentials are left untouched by default. Users who want Drive access must supply credentials that are approved for the
drivescope - either their own registered OAuth app or another client that has Google's approval for that scope.What is deliberately not done
Auto-enabling signond in
plasma6.nixis omitted. The accounts-sso upstream is effectively unmaintained (Qt6 support lives in a fork and an open MR), and KDE is actively building a replacement (KOnlineAccounts). Making it opt-in keeps the default Plasma6 configuration clean until the situation upstream stabilises.Relation to previous PR
This is a rebase and refinement of #343023 ("nixos/plasma6: wrap signond", Sep 2024, closed Oct 2024) by @NyCodeGHG. The core packaging approach (symlinkJoin wrapper, SSO_PLUGINS_DIR) is taken directly from that PR. Differences from #343023:
plasma6.nixremoved (see above)services.signondmodule has sensible defaults (packagedefaults tokdePackages.signond,pluginsdefaults to[signon-plugin-oauth2, signon-kwallet-extension]) so a minimalservices.signond.enable = true;is sufficientBackground and prior art
Previous packaging attempts in nixpkgs
User reports: signon-plugin-oauth2 / signon-ui missing from NixOS
Root cause:
userActionFinished error: 2= missing signon-uiThe OAuth browser window is opened by signon-ui. Without it, the D-Bus call from signond returns
CommunicationError(error code 2).Why kio-gdrive stopped working: KDE's OAuth client lost Drive access
In June 2024 Google formally demanded that KDE either remove restricted Drive scopes from its OAuth registration or submit for re-verification within 90 days (or face a 100-user cap and an "unverified app" warning). KDE chose to remove the scope, breaking kio-gdrive for all users.
Future: KOnlineAccounts - the planned replacement
The accounts-sso stack (signond, signon-plugin-oauth2, signon-ui) is effectively unmaintained and KDE is actively working on a replacement. This PR is a stopgap until KOnlineAccounts matures and kio-gdrive or its successor adopts it.
cc @NyCodeGHG @K900 @OPNA2608 @Scrumplex @NickCao
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.