DankMaterialShell icon indicating copy to clipboard operation
DankMaterialShell copied to clipboard

Plugins: let an administrator turn off the plugin and theme registries

Open alvarosth opened this issue 2 months ago • 0 comments

Feature Description

A key in the administrator CLI policy (/etc/dms/cli-policy.json, or the packaged /usr/share/dms/cli-policy.json) that turns off the plugin and theme registries, so DMS never clones or pulls a registry at run time. Installed plugins and themes keep working; only browsing, installing from a registry and registry-based update checks go away.

Implemented in #3703, with docs in AvengeMedia/DankLinux-Docs#158.

Use Case

I run DMS from a NixOS configuration that pins it and installs plugins system-wide from sources fetched at build time, at a pinned revision. On a system like this, and on managed or offline machines, nothing should be fetched at run time that isn't pinned.

Today the official registry is always on. Opening Settings → Plugins or Theme & colors, the plugins page of the first-launch welcome, most dms plugins commands and the matching socket requests all clone or pull it into $TMPDIR/dankdots-plugin-registry. Offline, a failed pull also deletes the cached clone, and plugins.listInstalled then returns an error instead of the installed plugins.

Compositor(s)

All compositors

If Other, please specify

No response

Proposed Solution

{
  "policy_version": 1,
  "disable_registries": true
}

The key is off by default and independent of immutable_system; the /etc file wins over the packaged one. #3703 applies it where the plugin and theme registries are created, which the CLI, the socket handlers and Settings all share, so no caller needs its own check. dms registry and registries.json keep editing the configuration, but it has no effect while the key is set.

Possible follow-ups: a "disabled by policy" message on install, hiding the browse buttons in Settings, and a NixOS module option that writes the key.

Alternatives/Existing Solutions

  • An environment variable: it belongs to the user session, not to the administrator.
  • An administrator-owned registry list in /etc: more general (it would also allow a local mirror), but a boolean covers the need.
  • A downstream patch that empties the registry list: it works, but has to be re-checked on every release.

alvarosth avatar Oct 03 '26 10:10 alvarosth