Commit Graph

109 Commits

Author SHA1 Message Date
Frederik Rietdijk
ad1d58c622 Merge staging-next into staging 2019-08-31 10:04:20 +02:00
Eelco Dolstra
35c1c170d7 nix.conf: Set sandbox-fallback = false
For security, we don't want the sandbox to be disabled silently.
2019-08-27 21:17:20 +02:00
volth
35d68ef143 treewide: remove redundant quotes 2019-08-26 21:40:19 +00:00
Colin L Rice
d7aa6df31f nix-daemon: Fix builduser count to work when maxJobs is auto 2019-08-01 01:54:28 -04:00
Domen Kožar
036728f3f4
nix.binaryCaches: always set https://cache.nixos.org
There are many support questions when people add a new binary cache
and they suddenly lose nixos substitutions.

Most of the users want to keep that, so we're doing a breaking change.

Previously to disable all binary caches one had to do:

  nix.binaryCache = [];

Now the same is possible via:

  nix.binaryCache = lib.mkForce;
2019-06-26 14:30:56 +02:00
volth
f3535aeea3
nix.systemFeatures: minor fix
following up #59148
I forgot the default case of the architectures which do not have minor brothers whose code they can run ("westmere" or any of of AMD)
2019-05-05 22:14:24 +00:00
volth
5a2356cff1
nix.systemFeatures: minor refactor 2019-04-30 16:28:21 +00:00
volth
5ad79dc4bb compilation for particular x86_64 architecture 2019-04-30 14:28:04 +00:00
Symphorien Gibol
a915b33315 nixos: add preferLocalBuild=true; on derivations for config files 2019-02-22 20:11:27 +01:00
Jörg Thalheim
ced57f7888
nixos/nix-daemon: default to build with all cores available
These days build systems are more robust w.r.t. to concurrency.
Most users will have at least two cores in their machines.
Therefore I suggest to increase the number of cores used for building.

fixes #50376
2018-11-16 02:05:30 +00:00
volth
5ea22a5b00 nixos/nix: ignore nix.checkConfig when cross-compiling (#48225)
* nixos/nix: ignore nix.checkConfig when cross-compiling

the check always fails because of architecture mismatch

* typos
2018-11-09 19:18:06 -06:00
Silvan Mosberger
c81ca5491f
Merge pull request #46041 from nh2/issue-46038-nix-daemon-ssh-path
nix-daemon service: Ensure `ssh` is on PATH. Fixes #46038.
2018-10-11 21:51:37 +02:00
Will Dietz
243e28bc96 nix-daemon: only add channels dir to NIX_PATH if exists
Per reviewer comment (thanks!).
2018-09-29 20:29:33 -04:00
Will Dietz
f3a114e088 NIX_PATH: don't prepend $HOME-based value in session variable, set later
environment.sessionVariables cannot refer to the values of env vars,
and as a result this has caused problems in a variety of scenarios.

One use for these is that they're injected into /etc/profile,
elewhere these are used to populate an 'envfile' for pam
(`pam 5 pam_env.conf`) which mentions use of HOME being
potentially problematic.

Anyway if the goal is to make things easier for users,
simply do the NIX_PATH modification as extraInit.

This fixes the annoying problems generated by the current approach
(#40165 and others) while hopefully serving the original goal.

One way to check if things are borked is to try:

$ sudo env | grep NIX_PATH

Which (before this change) prints NIX_PATH variable with
an unexpanded $HOME in the value.

-------

This does mean the following won't contain user channels for 'will':
$ sudo -u will nix-instantiate --eval -E builtins.nixPath

However AFAICT currently they won't be present either,
due to unescaped $HOME.  Unsure if similar situation for other users
of sessionVariables (not sudo) work with current situation
(if they exist they will regress after this change AFAIK).
2018-09-29 20:29:33 -04:00
Eelco Dolstra
9c53116d49
Revert "nixos: set nixos in nixPath"
This reverts commit 67c8c49177.

'nix run nixos.firefox' is *not* supposed to work - the Nix 2.x
interface attempts to standardize on nixpkgs.*, to get rid of the
nixos/nixpkgs confusion that existed with the channels interface. So
let's not bring that confusion back.
2018-09-24 10:42:01 +02:00
Matthew Bauer
67c8c49177 nixos: set nixos in nixPath
This makes using the nixos channel work out of the box with the new
Nix commands. For example:

$ nix run nixos.firefox -c firefox

Fixes #46536
2018-09-23 00:14:27 -05:00
Niklas Hambüchen
31919bce6b nix-daemon service: Ensure ssh is on PATH. Fixes #46038.
This fixes a regression introduced in commit
  700e21d6da

nix needs ssh on path for the SSH substituter functionality,
not only the distributed builds functionality.

Signed-off-by: Niklas Hambüchen <mail@nh2.me>
2018-09-04 16:19:35 +02:00
Silvan Mosberger
eacaaa2161
Merge pull request #44880 from srghma/build-max-jobs-auto
nixos/nix-daemon: build-max-jobs, add support to auto
2018-08-18 16:46:08 +02:00
srghma
37e2ebdfbc nixos/nix-daemon: build-max-jobs, add support to auto 2018-08-18 14:45:12 +03:00
Andreas Rammhold
4f6df27aee
nixos/nix-daemon: default nix.useSandbox to true. 2018-07-29 16:47:10 +02:00
Florian Klink
fff5923686 nixos/modules: users.(extraUsers|extraGroup->users|group) 2018-06-30 03:02:58 +02:00
Brandon Elam Barker
f098e60ecf nixos/sandbox: improve documentation.
This was put together based on feedback from LnL on IRC.
2018-06-07 21:43:52 +01:00
Tuomas Tynkkynen
f9feacfc7c Merge remote-tracking branch 'upstream/master' into staging 2018-05-22 17:48:29 +03:00
Daniel Peebles
0598652303
Stop requiring the nixpkgs symlink in NixOS channel tarballs
Ideally I'd like the whole `nixos`/`nixpkgs` channel distinction to disappear, but this is a step along that path. After a while being in this state, we can stop creating the magic `nixpkgs -> .` symlink inside our `nixos` channel tarballs and simplify that whole mess a bit.
2018-05-21 16:41:03 -04:00
Matthew Justin Bauer
eeb016e8f0
Merge branch 'staging' into fix-ncurses-darwin-extensions 2018-05-02 15:40:38 -05:00
Graham Christensen
5d03cce7ed
Merge pull request #38351 from grahamc/user-channels
Add user channels to the default nix path
2018-05-01 07:19:38 -04:00
Graham Christensen
8ab8d9cb74
Add user channels to the default nix path 2018-05-01 06:30:31 -04:00
Will Dietz
fa1d1eec6e nixos/nix-daemon: optionally (on by default) check nix.conf can be read
* checks using package providing the nix-daemon that we'll be using
* made optional (unlike some other config checks) "just in case":
  since this requires running the new Nix on the builder, this
  won't work in a few (AFAIK very uncommon) situations such as
  cross-compiling NixOS or using `include` directives in nix.conf

This does rely on Nix2 but not by the builder.
Since we only offer Nix2+ in-tree this should be fine,
and may otherwise be required anyway.
2018-04-24 10:16:57 -05:00
Eelco Dolstra
0236a947d0
mkdir -> install -d
Fixes #38421.
2018-04-04 13:04:35 +02:00
Eelco Dolstra
7db841512a
Remove obsolete /nix/var/nix/{manifests,channel-cache} 2018-03-20 18:26:13 +01:00
Jan Malakhovski
7079e744d4 Merge branch 'master' into staging
Resolved the following conflicts (by carefully applying patches from the both
branches since the fork point):

   pkgs/development/libraries/epoxy/default.nix
   pkgs/development/libraries/gtk+/3.x.nix
   pkgs/development/python-modules/asgiref/default.nix
   pkgs/development/python-modules/daphne/default.nix
   pkgs/os-specific/linux/systemd/default.nix
2018-03-10 20:38:13 +00:00
Shea Levy
fec543436d
nixos: Move uses of stdenv.shell to runtimeShell. 2018-03-01 14:38:53 -05:00
Eelco Dolstra
212dd84dd2
Cleanup 2018-02-27 20:03:12 +01:00
Eelco Dolstra
700e21d6da nix-daemon.nix: Updates for Nix 2.0
* The environment variables NIX_CONF_DIR, NIX_BUILD_HOOK and
  NIX_REMOTE are no longer needed.

* A /bin/sh (from busybox) is provided by default in sandboxes.

* Various options were renamed.
2018-01-31 22:26:05 +01:00
Frank Doepper
08bf000fe2 nix-daemon: mention speedFactor in example 2017-10-10 15:07:35 +02:00
Eelco Dolstra
79d547b4bb
nix-daemon: Bump the default number of build users
While it's annoying to pollute the user database with a lot of nixbld*
users, 10 users is really too low for many modern systems.
2017-09-27 17:13:16 +02:00
Franz Pletz
3ab45f4b36
treewide: use boolToString function 2017-04-11 18:18:53 +02:00
Eelco Dolstra
78bb734452
nix-daemon.nix: Make the 1.12 check less strict 2017-03-21 18:48:35 +01:00
Robin Gloster
c808801937
nix-daemon: fix autoOptimiseStore option 2017-03-21 02:17:09 +01:00
Philipp Steinpass
68c6d90417 Added option and description for nix store auto-optimisation. 2017-03-20 19:09:19 +01:00
Bjørn Forsman
316e7d6764 nixos/nix-daemon: doc: use literalExample
Makes the example more readable by not squashed everything onto one
single line.
2017-03-05 14:07:23 +01:00
Eelco Dolstra
3971876585
nix-daemon: Remove a bunch of unnecessary environment variables 2017-03-03 16:50:37 +01:00
Eelco Dolstra
3070c88798
Fix incorrect $NIX_BUILD_HOOK on Nix 1.12 2017-03-03 16:50:26 +01:00
Graham Christensen
7483ba0932
Revert "nix-daemon: default useSandbox to true"
This reverts commit d0a086770a.
2017-02-14 14:13:39 -05:00
Graham Christensen
d0a086770a
nix-daemon: default useSandbox to true 2017-02-13 18:06:01 -05:00
Chris Martin
6a7664e6cd Add some more details about useSandbox 2017-01-03 14:24:49 -05:00
Michael Stapelberg
9cbf8a0652 Fix buildMachines example: use lists, not string (#20361)
Using the example before this commit resulted in the following error:

```
error: value is a string while a list was expected, at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/services/misc/nix-daemon.nix:349:37
```
2016-11-15 07:04:32 +01:00
Eelco Dolstra
2755bcfa7c In $NIX_PATH, use nixpkgs=...
This is required by the "nix" command to find Nixpkgs.
2016-08-29 17:50:25 +02:00
Joachim Fasting
f3ef4383c6
nix-daemon service: fix unbalanced parens in description 2016-08-23 13:06:25 +02:00
Tuomas Tynkkynen
1d4b21ef42 treewide: Use correct output of config.nix.package in non-string contexts 2016-04-25 16:44:38 +02:00