-
-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
nixos: Introduce nix.buildLocation option #83166
Conversation
Well, I prefer (ideally) to force nix-daemon to choose /tmp, /var/ssd, or /var/spinning-disk depending of size of sources, and predicted overall usage. I definitely won't to degrade performance of everything, pushing /tmp to spinning disks. I actually had this solutuion, now generalized to nixos option, which I used couple years. We discussed it in IRC yesterday, and I proposed to make this chanhe (it why I cast @cleverca22 here). But you are right -- is an opinionated change, and point to discuss, |
@volth I see, but anyway it not solve memory vs swap usage here. Ideally would be nice to have ability to "annotate" derivation by some labels, (which should not affect purity/cache), but suggest nix to pick better builder (or builder options -- like spool dir/cpu cores/memory/time limits, etc) |
6061833
to
83aedb8
Compare
@Mic92 applied both suggestions |
83aedb8
to
44eba29
Compare
@GrahamcOfBorg test installer.simple |
1 similar comment
@GrahamcOfBorg test installer.simple |
This has a merge conflict now unfortunately. |
Allow to specify where package build will happens. It helps big packages (like browsers) not to overflow tmpfs.
44eba29
to
5291925
Compare
@@ -490,6 +502,8 @@ in | |||
restartTriggers = [ nixConf ]; | |||
}; | |||
|
|||
systemd.tmpfiles.rules = [ "d ${cfg.buildLocation} 0775 root root -" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks write permissions for non-root on /tmp
with the default value and boot.tmpOnTmpfs = true;
setting up tmpfiles
[/etc/tmpfiles.d/tmp.conf:11] Duplicate line for path "/tmp", ignoring.
$ getfacl /tmp
getfacl: Removing leading '/' from absolute path names
# file: tmp/
# owner: root
# group: root
user::rwx
group::rwx
other::r-x
As @gravndal already noted the See also #85552. |
Yes :) it is far worse. This affects every reboot. Sway segfaults for me when it cannot write to /tmp. |
This reverts commit 5291925. Reason: This started to cause severe regressions, see: - #85552 - #83166 (review) Fixes #85552.
I reverted this change in 0e4417f for now so we can properly resolve this without any pressure. |
@primeos thanks! |
yes. |
Allow to specify where package build will happens.
It helps big packages (like browsers) not to overflow tmpfs.
Motivation for this change
/tmp overflow during build big packages (like chromium and/or firefox) is very annoying, so I added option to run builds on dedicated filesystem/directory.
/cc @cleverca22 for review, we discuss possibility of this change earlier.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)