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

environment.noXlibs: change defaults #46013

Closed
wants to merge 3 commits into from
Closed

environment.noXlibs: change defaults #46013

wants to merge 3 commits into from

Conversation

@volth
Copy link
Contributor

volth commented Sep 3, 2018

Motivation for this change
  1. change default value from false to (!config.services.xserver.enable && !config.services.xrdp.enable)
  2. if noXLibs, disable by default udisks2 and polkit, as they are huge closures (#45222 (comment)) useful for desktop
  3. remove fontconfig as irrelevant here, it is used by rrdtool (collectd's graphs) and other imaging tools/libraries

9.needs: community feedback
Please, do not merge quickly, I'd like to collect user's practices around environment.noXlibs to make it better.
Here is just how I am using it

1. change default value from false to (!config.services.xserver.enable && !config.services.xrdp.enable)
2. if noXLibs, disable by default udisks2 and polkit, as they are huge closures (#45222 (comment)) useful for desktop
3. remove fontconfig as irrelevant here, it is used by rrdtool (collectd's graphs) and other imaging tools/libraries
@@ -23,8 +23,10 @@ with lib;
config = mkIf config.environment.noXlibs {
programs.ssh.setXAuthLocation = false;
security.pam.services.su.forwardXAuth = lib.mkForce false;

This comment has been minimized.

Copy link
@vcunat

vcunat Sep 4, 2018

Member

I wonder if the auto-trigger of noXlibs is suitable with implied mkForce.

@@ -9,7 +9,7 @@ with lib;
options = {
environment.noXlibs = mkOption {
type = types.bool;
default = false;
default = !config.services.xserver.enable && !config.services.xrdp.enable;

This comment has been minimized.

Copy link
@matthewbauer

matthewbauer Nov 16, 2018

Member

This will cause lots of things to get rebuilt when you don't have xserver. This should be explicitly set in a configuration - not determined implicitly.

This comment has been minimized.

Copy link
@volth

volth Nov 17, 2018

Author Contributor

I thought about environment.noXlibs exactly as the setting which should cause rebuilds in order to make closures with less dependencies.
How would it be possible otherwise to get rid on the X11 dependencies without rebuilding the closures which have them ?

This comment has been minimized.

Copy link
@Infinisil

Infinisil Nov 17, 2018

Member

Yes, but a lot of people just run a normal X-less instance on their servers, but don't really care about closure size. This change would make them rebuild a whole lot of stuff without any benefit.

One thing I'd like to have eventually (which will solve this problem) is for hydra to build the X-less variants of the packages as well.

This comment has been minimized.

Copy link
@aanderse

aanderse May 8, 2019

Contributor

I agree having hydra build X-less variants would be a good solution to this. Are there any obstacles in the way other than just doing the work?

security.pam.services.su.forwardXAuth = lib.mkDefault false;
services.openssh.forwardX11 = lib.mkDefault false;

services.udisks2.enable = lib.mkDefault false;

This comment has been minimized.

Copy link
@matthewbauer

matthewbauer Nov 16, 2018

Member

These look like good changes though!

@adrianparvino adrianparvino mentioned this pull request Nov 30, 2019
6 of 10 tasks complete
@volth volth closed this Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.