Commit graph

24 commits

Author SHA1 Message Date
Izorkin 058951e85d
nixos/installer/cd-dvd: removing duplicate nixpkgs 2023-01-19 22:52:45 +03:00
Naïm Favier 364d3609cd
nixos/installer/cd-dvd: use filtered nixpkgs source
Pin the `nixpkgs` registry entry to the *filtered* nixpkgs source to
avoid copying the entire `.git` directory to the ISO when building
from a local checkout.

Also set `to` directly instead of the `flake.outPath` hack.
2022-12-04 14:54:18 +01:00
MatthewCroughan c40da01e17
Update nixos/modules/installer/cd-dvd/channel.nix
Co-authored-by: Louis Bettens <lourkeur@users.noreply.github.com>
2022-09-26 19:36:13 +01:00
matthewcroughan 31dbd4cb91 nixos/modules/installer/cd-dvd/channel.nix: pin nixpkgs registry to pkgs.path via nix.settings.registry 2022-09-26 16:23:48 +01:00
matthewcroughan 2367007613 nixos/modules/installer/cd-dvd/channel.nix: pin nixpkgs registry to pkgs.path via boot.postBootCommands 2022-08-31 14:42:05 +01:00
Will Fancher f3f2e55e59 nixos: Fix channel copying in installer tests with systemd stage 1 2022-04-17 18:31:35 -04:00
Eelco Dolstra a5f883e535 nixos/modules/installer/cd-dvd/channel.nix: Handle null config.system.nixos.revision 2020-02-15 20:16:14 +01:00
Symphorien Gibol a915b33315 nixos: add preferLocalBuild=true; on derivations for config files 2019-02-22 20:11:27 +01:00
Matthew Bauer f05d8f31ec make-disk-image: use filterSource instead of cleanSource
cleanSource does not appear to work correctly in this case. The path
does not get coerced to a string, resulting in a dangling symlink
produced in channel.nix.  Not sure why, but this
seems to fix it.

Fixes #51025.

/cc @elvishjericco
2019-01-07 16:28:50 -06:00
Tuomas Tynkkynen bd77849b2f nixos/installer/channel: Add some files that the channel also has
Nothing probably uses this, but let's be pedantic and have the
pre-included channel on the install media be as close as possible to
what 'nix-channel --update' will give them.

The only remaining difference is that the channel adds programs.sqlite,
which is fundamentally unfixable.
2018-04-16 20:39:51 +03:00
Jan Malakhovski 2e6b796761 nixos: rename config.system.nixos* -> config.system.nixos.* 2018-02-18 12:56:30 +00:00
Dan Peebles e2589b3ca2 Deduplicate some filterSource invocations
This version should have more conventional regexes that work across many
platforms and regex engines. This is an issue because up until Nix 1.11,
Nix called out to the libc regex matcher, which behaved differently on
Darwin and Linux. And in Nix 1.12, we're moving to std::regex which will
also behave differently here.

And yes, I do actually evaluate make-disk-image.nix on Darwin ;)
2017-08-29 20:27:04 -04:00
Tuomas Tynkkynen 60788745c9 channel.nix: Use filterSource to exclude unnecessary files from nixpkgs
Currently, if you try to build a NixOS config including channel.nix, e.g.:

nix-build -I nixpkgs=. -I nixos-config=nixos/modules/installer/cd-dvd/installation-cd-minimal.nix nixos -A config.system.build.isoImage

twice in a row, you end up with two different build results. This is
caused by the 'result' symlink of the first build affecting the channel
contents of the second build.

If we use filterSource with a predicate that ignores the 'result'
symlinks, the problem is gone. Do the same thing for VIM/Emacs
swap/backup files to avoid even more 'spurious' rebuilds.

Additionally, filter out the '.git' directory at the same time, as we
'rm -rf' it from the result anyway. This avoids a considerable amount of
unnecessary file I/O copying and deleting the .git directory.
2017-03-25 01:42:28 +02:00
Tuomas Tynkkynen 60f5659dad treewide: Use correct output in ${config.nix.package}/bin 2016-04-25 16:44:37 +02:00
Domen Kožar 75284b09e1 Fix ISO building from a channel
Building config.system.build.isoImage would fail with the following
error using the channel:

  ln: failed to create symbolic link
'/nix/store/zz0hzi5imrg4927v6f8mv281qs6v6pbq-nixos-16.03pre69762.e916273/nixos/nixpkgs/.': File exists

The fix skips symlink as it already exists if the channel
nixpkgs copy is used.

Fixes #10367
2016-01-16 21:58:40 +01:00
Eelco Dolstra efed00b55e channel.nix: Fix broken flag to skip substitutes 2015-09-27 21:06:35 +02:00
Eelco Dolstra 2cd7c1f198 Unify NixOS and Nixpkgs channel structure
This is primarily to ensure that

  -I nixpkgs=https://nixos.org/channels/nixos-unstable/nixexprs.tar.xz

and

  -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz

and

  -I nixpkgs=https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz

behave consistently.

It also allows installing packages via "nix-env -iA nixos.<pkg>"
rather than "nixos.pkgs.<pkg>". It would be even better to allow
"nixpkgs.<pkg>", but that requires a change to nix-channel.

Fixes #7659.
2015-08-05 17:37:11 +02:00
Eelco Dolstra 29027fd1e1 Rewrite ‘with pkgs.lib’ -> ‘with lib’
Using pkgs.lib on the spine of module evaluation is problematic
because the pkgs argument depends on the result of module
evaluation. To prevent an infinite recursion, pkgs and some of the
modules are evaluated twice, which is inefficient. Using ‘with lib’
prevents this problem.
2014-04-14 16:26:48 +02:00
Eelco Dolstra 819e7c9fbd Add a test for NixOS containers 2014-04-03 16:36:24 +02:00
Eelco Dolstra 785eaf2cea Add some primops to lib 2013-11-12 13:48:30 +01:00
Eelco Dolstra 259f7a93b1 Rename environment.nix -> nix.package 2013-10-28 22:45:57 +01:00
Eelco Dolstra 8485487727 Get rid of <nixpkgs> 2013-10-15 17:52:02 +02:00
Eelco Dolstra 31203732b3 Update the release expressions and the channel generators 2013-10-10 13:28:22 +02:00
Eelco Dolstra 5c1f8cbc70 Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00
Renamed from modules/installer/cd-dvd/channel.nix (Browse further)