Hacker News new | ask | show | jobs
by Arnavion 1558 days ago
The standard way of doing this is to define your own package for what you want installed on the system. Check in the package spec to version control and it gives you the history of everything you wanted in the past. For your sway-xwayland case, make another package that depends on both, and make that a dependency of your system package instead of sway and xwayland directly.

You will also need to use your package manager's method of marking all packages as "automatically installed" except for your system package. How easy this is depends on the package manager. Eg for Alpine's apk this is trivial, because all packages are "automatically installed" unless they're listed in /etc/apk/world, but for OpenSUSE's zypper you need to update /var/lib/zypp/AutoInstalled to include every installed package and periodically refresh it when zypper decided to switch an automatically-installed package to manually-installed for some reason.