-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Standard gentoo-like "use" flags across nixpkgs #12877
Copy link
Copy link
Open
Labels
1.severity: significantNovel ideas, large API changes, notable refactorings, issues with RFC potential, etc.Novel ideas, large API changes, notable refactorings, issues with RFC potential, etc.2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: policy discussionDiscuss policies to work in and around NixpkgsDiscuss policies to work in and around Nixpkgs9.needs: community feedbackThis needs feedback from more community members.This needs feedback from more community members.
Metadata
Metadata
Assignees
Labels
1.severity: significantNovel ideas, large API changes, notable refactorings, issues with RFC potential, etc.Novel ideas, large API changes, notable refactorings, issues with RFC potential, etc.2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: policy discussionDiscuss policies to work in and around NixpkgsDiscuss policies to work in and around Nixpkgs9.needs: community feedbackThis needs feedback from more community members.This needs feedback from more community members.
Fields
Give feedbackNo fields configured for issues without a type.
Before telling me nix already supports this, hear me out 😄
Take a "headless" Nix (NixOS or otherwise) system. A whole load of packages have slightly different options to disable GUI components, but none of them are standardized, and thus we can end up with a completely headless server bundling a ton of graphics stuff because it depends for example on
pinentrywhich optionally supports a GUI prompt and thus pulls in a ton of graphical crap.What if we instituted a set of standard flags that would be available through
stdenvthat would help us determine those options? For example:And then our closures get small again. Individual packages could still keep ad-hoc flags in their parameter set, but this would help us standardize on a set of common flags of this sort.
Off the top of my head, I'd start with these common flags:
headless: disable any GUI components[this is already on by default, now]hardened: use any additional package-specific hardening measures available (thestdenvwould also apply some default hardening steps, but certain packages might need additional knowledge of this)monolingual: get rid of language translations (and default to whatever you specify if not english)There are probably others, but I think we could get a lot of value out of just these two.
cc:
hardenedflag