Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep users from running packages that are only supposed to be run in a module #510

Open
erictapen opened this issue Feb 17, 2025 · 2 comments
Assignees

Comments

@erictapen
Copy link
Contributor

As a user of NGIpks, I want to run packaged software on my computer. In some cases the most direct path is not the right one. Projects that only are supposed to provide a service necessarily also contain a package with an executable, that is run by the service. That executable is often not really meant to be run on its own.

Example: In NixOS/nixpkgs#377713 (comment) a user tried to run canaille in their local shell instead of deploying the service.

Implementation

Introduce a flag that marks a package as something that is not supposed to be run directly by users. Project documentation won't show information on how to run that package locally then (e.g. by not showing a nix-shell -p command.

@erictapen erictapen self-assigned this Feb 17, 2025
@github-project-automation github-project-automation bot moved this to Needs refinement in Nix@NGI Feb 17, 2025
@fricklerhandwerk
Copy link
Contributor

How about turning that around and only exposing executables via e.g. programs?

@erictapen
Copy link
Contributor Author

So we would ditch environment.systemPackages entirely? It's kind of a well known interface to "install" software.
Only exposing modules for NixOS users would certainly solve the descriped problem, yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs refinement
Development

No branches or pull requests

2 participants