{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/12877","repository_url":"https://api.github.com/repos/NixOS/nixpkgs","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/12877/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/12877/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/12877/events","html_url":"https://github.com/NixOS/nixpkgs/issues/12877","id":132210050,"number":12877,"title":"Standard gentoo-like \"use\" flags across nixpkgs","user":{"login":"copumpkin","id":2623,"avatar_url":"https://avatars.githubusercontent.com/u/2623?v=3","gravatar_id":"","url":"https://api.github.com/users/copumpkin","html_url":"https://github.com/copumpkin","followers_url":"https://api.github.com/users/copumpkin/followers","following_url":"https://api.github.com/users/copumpkin/following{/other_user}","gists_url":"https://api.github.com/users/copumpkin/gists{/gist_id}","starred_url":"https://api.github.com/users/copumpkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/copumpkin/subscriptions","organizations_url":"https://api.github.com/users/copumpkin/orgs","repos_url":"https://api.github.com/users/copumpkin/repos","events_url":"https://api.github.com/users/copumpkin/events{/privacy}","received_events_url":"https://api.github.com/users/copumpkin/received_events","type":"User","site_admin":false},"labels":[{"id":335672980,"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/6.topic:%20policy%20discussion","name":"6.topic: policy discussion","color":"fef2c0","default":false},{"id":465618943,"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/9.needs:%20community%20feedback","name":"9.needs: community feedback","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-02-08T17:38:11Z","updated_at":"2016-11-05T10:28:46Z","closed_at":null,"body":"Before telling me nix already supports this, hear me out :smile: \n\nTake 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 `pinentry` which optionally supports a GUI prompt and thus pulls in a ton of graphical crap.\n\nWhat if we instituted a set of standard flags that would be available through `stdenv` that would help us determine those options? For example:\n\n``` nix\n{ stdenv, fetchurl, mesa, gnome }:\n\nstdenv.mkDerivation {\n  buildInputs = stdenv.lib.optional (!stdenv.flags.headless) [ mesa gnome ];\n}\n```\n\nAnd 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.\n\nOff the top of my head, I'd start with these common flags:\n- `headless`: disable any GUI components\n- ~~`hardened`: use any additional package-specific hardening measures available (the `stdenv` would also apply some default hardening steps, but certain packages might need additional knowledge of this)~~ [this is already on by default, now]\n- `monolingual`: get rid of language translations (and default to whatever you specify if not english)\n\nThere are probably others, but I think we could get a lot of value out of just these two.\n\ncc:\n- @edolstra @shlevy @vcunat: general knowing of things\n- @globin @thoughtpolice: probably care about the `hardened` flag\n"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/258603180","html_url":"https://github.com/NixOS/nixpkgs/issues/12877#issuecomment-258603180","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/12877","id":258603180,"user":{"login":"spacekitteh","id":1940652,"avatar_url":"https://avatars.githubusercontent.com/u/1940652?v=3","gravatar_id":"","url":"https://api.github.com/users/spacekitteh","html_url":"https://github.com/spacekitteh","followers_url":"https://api.github.com/users/spacekitteh/followers","following_url":"https://api.github.com/users/spacekitteh/following{/other_user}","gists_url":"https://api.github.com/users/spacekitteh/gists{/gist_id}","starred_url":"https://api.github.com/users/spacekitteh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spacekitteh/subscriptions","organizations_url":"https://api.github.com/users/spacekitteh/orgs","repos_url":"https://api.github.com/users/spacekitteh/repos","events_url":"https://api.github.com/users/spacekitteh/events{/privacy}","received_events_url":"https://api.github.com/users/spacekitteh/received_events","type":"User","site_admin":false},"created_at":"2016-11-05T10:28:46Z","updated_at":"2016-11-05T10:28:46Z","body":"the security aspect comes from disabling unnecessary options. for example, a web server has no use for audio support or screen reader support. additionally, it allows the specifying of more-secure-yet-less-performing replacements, such as specifying a particular crypto implementation."}}
{"actor":{"display_login":"spacekitteh"}}