Commit Graph

37 Commits

Author SHA1 Message Date
Mathijs Kwik
26bf696350 Revert "allow out-of-tree nixos modules"
This reverts commit b609ff4fcf.

It turns out this can just be done using "require".
2012-07-21 18:30:58 +02:00
Mathijs Kwik
b609ff4fcf allow out-of-tree nixos modules
The environment variable "NIXOS_EXTRA_MODULES" is now checked to
contain a path to a file similar to modules/module-list.nix.

This gives the ability to include nixos modules that are not in the
nixos source tree.

This can be useful for modules that are still experimental, or which
aren't useful for other nixos users. Of course, this was already
possible to do this using a forked nixos tree, but with this
functionality, you can just rely on the nixos channel, easing things a
lot.
2012-07-21 17:35:50 +02:00
Eelco Dolstra
29d84af677 * Remove the use of the NIXPKGS and NIXOS environment variables.
Instead use $NIX_PATH.  NIXOS_CONFIG is still supported.

svn path=/nixos/trunk/; revision=32739
2012-03-02 12:38:22 +00:00
Peter Simons
eb6e1310b8 strip trailing whitespace; no functional change
svn path=/nixos/trunk/; revision=29285
2011-09-14 18:20:50 +00:00
Eelco Dolstra
c1295661c4 * Added a command `nixos-rebuild build-vm-with-bootloader'. This is
like `build-vm', but boots using the regular boot loader (i.e. GRUB
  1 or 2) rather than booting directly from the kernel/initrd.  Thus
  it allows testing of GRUB.

svn path=/nixos/trunk/; revision=23747
2010-09-13 12:34:58 +00:00
Eelco Dolstra
194a24bcf1 * Support a `system' argument for if you want to do hacky things like
change a NixOS installation from x86_64-linux to i686-linux (or vice
  versa if you have distributed builds enabled - I used this upgrade
  from 32-bit to 64-bit NixOS).

svn path=/nixos/trunk/; revision=18177
2009-11-06 01:00:44 +00:00
Eelco Dolstra
685335df2f * system.build.system -> system.build.toplevel, since the former name
is just too weird.

svn path=/nixos/trunk/; revision=16954
2009-09-04 09:29:18 +00:00
Eelco Dolstra
2892aed712 * lib/eval-config.nix: combined "configuration" and "extraModules"
into one argument "modules".
* release.nix: fixed the manual job.
* ISO generation: break an infinite recursion.  Don't know why this
  suddenly happens.  Probably because of the nixpkgs.config change,
  but I don't see why.  Maybe the option evaluation is too strict.

svn path=/nixos/trunk/; revision=16878
2009-08-27 11:57:43 +00:00
Nicolas Pierron
ce030d6c35 inherit eval to access option declarations from outside programs.
svn path=/nixos/trunk/; revision=16770
2009-08-19 15:04:11 +00:00
Eelco Dolstra
89ef5c979b * New nixos-rebuild action: "nixos-rebuild build-vm" builds a virtual
machine containing a replica (minus the state) of the system
  configuration.  This is mostly useful for testing configuration
  changes prior to doing an actual "nixos-rebuild switch" (or even
  "nixos-rebuild test").  The VM can be started as follows:

  $ nixos-rebuild build-vm
  $ ./result/bin/run-*-vm

  which starts a KVM/QEMU instance.  Additional QEMU options can be
  passed through the QEMU_OPTS environment variable
  (e.g. QEMU_OPTS="-redir tcp:8080::80" to forward a host port to the
  guest).  The fileSystem attribute of the regular system
  configuration is ignored (using mkOverride), because obviously we
  can't allow the VM to access the host's block devices.  Instead, at
  startup the VM creates an empty disk image in ./<hostname>.qcow2 to
  store the VM's root filesystem.

  Building a VM in this way is efficient because the VM shares its Nix
  store with the host (through a CIFS mount).  However, because the
  Nix store of the host is mounted read-only in the guest, you cannot
  run Nix build actions inside the VM.  Therefore the VM can only be
  reconfigured by re-running "nixos-rebuild build-vm" on the host and
  restarting the VM.

svn path=/nixos/trunk/; revision=16662
2009-08-11 01:35:56 +00:00
Eelco Dolstra
048e03377f * Don't try to run fsck on ISO-9660/UDF filesystems.
svn path=/nixos/branches/modular-nixos/; revision=15963
2009-06-15 15:50:36 +00:00
Eelco Dolstra
d69710cdf4 * Removed redundant import (Nicolas Pierron).
svn path=/nixos/branches/modular-nixos/; revision=15876
2009-06-05 15:04:33 +00:00
Eelco Dolstra
02d26fc77d * Make eval-config.nix a bit more general to make it easier to build
other kinds of configurations (like the installation CD).

svn path=/nixos/branches/modular-nixos/; revision=15864
2009-06-05 13:19:39 +00:00
Eelco Dolstra
3c6ae39a0d * Refactoring: moved some options out of system/options.nix (almost
empty now), do more of bashrc.sh declaratively, and moved nsswitch
  generation to modules/config/nsswitch.nix.

svn path=/nixos/branches/modular-nixos/; revision=15754
2009-05-27 23:14:38 +00:00
Eelco Dolstra
5b7f7d2de1 * Move the config evaluation into a separate expression so that it can
be reused, e.g. for building the CD/DVD.

svn path=/nixos/branches/modular-nixos/; revision=15744
2009-05-27 09:16:56 +00:00
Eelco Dolstra
cfa218a26b * Move the list of modules into a separate file. This file could be
generated by some find/grep hackery as Nicolas suggested.

svn path=/nixos/branches/modular-nixos/; revision=15743
2009-05-27 09:09:17 +00:00
Eelco Dolstra
8e98dc33f5 svn path=/nixos/branches/modular-nixos/; revision=15742 2009-05-27 09:03:07 +00:00
Eelco Dolstra
98cce35041 * Turn the top-level derivation of a NixOS configuration ("system")
into a NixOS module (modules/system/activation/top-level.nix -
  couldn't think of a better name).  The top-level derivation is
  returned in config.system.build.system.
* Inlined system.sh in top-level.nix so that we don't have to pass
  everything through environment variables.

svn path=/nixos/branches/modular-nixos/; revision=15740
2009-05-27 09:00:45 +00:00
Eelco Dolstra
7ac0b3aaea * Make modules/system/boot/stage-1.nix a proper module that exports
the initial ramdisk as config.system.build.bootStage1.

svn path=/nixos/branches/modular-nixos/; revision=15739
2009-05-27 08:14:06 +00:00
Eelco Dolstra
60b3f95ad8 * Move the definition of the set of system packages to
modules/config/system-path.nix.  system/system.nix is now almost
  empty.
* Removed the cleanStart option - it should be possible to get the
  same functionality by overriding config.system.path (or defining
  config.system.systemPackages with a higher priority - don't know if
  that works though).

svn path=/nixos/branches/modular-nixos/; revision=15727
2009-05-25 17:41:03 +00:00
Eelco Dolstra
f99fe41f65 svn path=/nixos/branches/modular-nixos/; revision=15670 2009-05-20 10:18:54 +00:00
Nicolas Pierron
3f1dd56e9e * Synced with trunk @ 14801
svn path=/nixos/branches/modular-nixos/; revision=14953
2009-04-08 14:01:16 +00:00
Nicolas Pierron
bb24373197 * Synced with trunk @ 13663
svn path=/nixos/branches/modular-nixos/; revision=14945
2009-04-08 13:32:37 +00:00
Michael Raskin
bcbfd8d386 Complete nixpkgsPath->nixpkgs rename
svn path=/nixos/trunk/; revision=14732
2009-03-27 09:29:11 +00:00
Eelco Dolstra
c155a3f46e * When doing chroot builds, the `build-chroot-dirs' option should
include the closure of /bin/sh.  Otherwise all builders that call
  /bin/sh will fail when using the new chroot implementation, which
  only bind-mounts the inputs of a build rather than the whole Nix
  store.

svn path=/nixos/trunk/; revision=13640
2008-12-15 23:54:10 +00:00
Nicolas Pierron
892d12bccf - Move some system configuration to options:
* system.nssModules
  * system.modulesTree
  * system.sbin.modprobe
  * system.sbin.mount
  * nix.envVars

- Remove Arguments that can be accessed either by "config" or "pkgs".

- Use the new scheme for upstart-jobs/default.nix.
This is now a configuration file which is imported by system/options.nix.

- Jobs can now include upstart-job/default.nix:
  * upstrat-jobs/cron.nix
  * upstart-jobs/dhclient.nix

=> No Nixos file refers to upstart-jobs/default.nix except if one of its options is require to define an extra job. (e.g.: cron, dhclient)

svn path=/nixos/branches/fix-style/; revision=13327
2008-11-18 18:00:09 +00:00
Marc Weber
d438b972b1 nixos-rebuild: take NIXPKGS location from env, too
svn path=/nixos/trunk/; revision=12981
2008-10-06 23:23:28 +00:00
Eelco Dolstra
5dc694d39a * Fixed references to values moved to boot-stage-1.nix.
svn path=/nixos/trunk/; revision=12582
2008-08-11 11:37:56 +00:00
Michael Raskin
6a84e72db6 Added nixos-gen-seccure-keys to nixosTools
svn path=/nixos/trunk/; revision=10937
2008-03-03 23:32:17 +00:00
Eelco Dolstra
a9281eae63 * Put the static files for the Subversion service in a separate directory.
svn path=/nixos/trunk/; revision=10697
2008-02-14 20:59:04 +00:00
Eelco Dolstra
ce250ffb37 * Installation CD: include a lot of modules (SATA, PATA, Firewire,
USB, some SCSI controllers) in the initrd for mounting the CD.
* Add nix-hardware-scan to the system.
* Upstart: don't use the -v flag.
* Include the NixOS version in the ISO image filename.
* Include testdisk and ms-sys in the CD.
* Some bugfixes in the installer.

svn path=/nixos/trunk/; revision=10556
2008-02-08 15:59:15 +00:00
Eelco Dolstra
cfed953b5f * Option to enable the Intel 3945 firmware. (It's enabled by
default since it doesn't seem to have the legal issues of
  the Intel 2200 firmware.)
* Firmware loader: don't write in /tmp.  Also a hack to quickly
  test new firmwares.
* Revert r10105 since the build fails if configuration.nix 
  is a symlink.  Anyway copying configuration.nix does not
  necessarily make sense since it can import other expressions,
  which would also have to be copied.  Perhaps a better 
  approach would be to write a serialisation of the config
  to a file (maybe with builtins.toXML).

svn path=/nixos/trunk/; revision=10127
2008-01-12 22:53:13 +00:00
Michael Raskin
f667e94752 Now configuration.nix is copied into shared.
svn path=/nixos/trunk/; revision=10105
2008-01-09 16:08:15 +00:00
Eelco Dolstra
2fc94b76fe * Eliminate all calls to config.get.
svn path=/nixos/trunk/; revision=9619
2007-11-09 18:49:45 +00:00
Eelco Dolstra
662b487e77 * Doh doh doh!
svn path=/nixos/trunk/; revision=9497
2007-10-19 19:33:15 +00:00
Eelco Dolstra
b9dd7509b6 * nixos-rebuild: before building NixOS, first build the latest Nix and
use that one to build NixOS.  This will make it easier to use
  bleeding-edge features in the NixOS expressions.

svn path=/nixos/trunk/; revision=9336
2007-09-18 15:38:05 +00:00
Eelco Dolstra
f2780fdc62 * Add a top-level default.nix for NixOS which has attributes useful
for building parts of the system.  E.g.

  $ nix-build /etc/nixos/nixos -A upstartJobs.xserver

  to build the Upstart job for the X server, or

  $ nix-build /etc/nixos/nixos -A kernel

  to build the NixOS kernel.

* /etc/profile.sh: if ~/.nix-defexpr doesn't exist yet, create it as a
  directory and add links to root's channels, /etc/nixos/nixos and
  /etc/nixos/install-source.nix (as "nixpkgs_sys").
  
* boot.useKernel -> boot.kernel.

svn path=/nixos/trunk/; revision=9334
2007-09-18 15:06:24 +00:00