Commit graph

61 commits

Author SHA1 Message Date
Eelco Dolstra cda2e41c01 * Added a "xendomains" job to automatically start the domains defined
in /etc/xen/auto at boot time, to save all running domains during
  shutdown, and to restore all saved domains at boot time.

svn path=/nixos/trunk/; revision=24121
2010-10-06 16:07:16 +00:00
Eelco Dolstra c4f910f550 * Substitute the path of the system derivation directly in the stage 2
init script.  This removes the need for the `systemConfig' boot
  parameter; `init=<stage-2-init>' is enough.  However, the GRUB menu
  builder still needs to add `systemConfig' to the kernel command line
  for compatibility with old configurations.

svn path=/nixos/trunk/; revision=23775
2010-09-13 22:10:25 +00:00
Eelco Dolstra 4046056cdc * In the activation script, don't require the path to the "system"
derivation on the command line.

svn path=/nixos/trunk/; revision=23770
2010-09-13 18:19:15 +00:00
Eelco Dolstra f729f12e4e Some cleanups in the activation script:
* Moved some scriptlets to the appropriate modules.
* Put the scriptlet that sets the default path at the start, since it
  never makes sense not to have it there.  It no longer needs to be
  declared as a dependency.
* If a scriptlet has no dependencies, it can be denoted as a plain
  string (i.e., `noDepEntry' is not needed anymore).

svn path=/nixos/trunk/; revision=23762
2010-09-13 15:41:38 +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 987dd76811 * Added a module to enable the Xen hypervisor.
svn path=/nixos/trunk/; revision=23739
2010-09-12 22:43:45 +00:00
Nicolas Pierron c9dc3651da Replace mkOverride by its alias mkOverrideTemplate to remove the unused
template argument of mkOverride later.

svn path=/nixos/trunk/; revision=23631
2010-09-03 19:10:59 +00:00
Eelco Dolstra f067d179ab * Create /nix/var/nix/gcroots/tmp in the activation script. The
build hook uses this directory to store temporary GC roots.  (It
  creates it if it doesn't exist, but it's better to do it here as
  well to ensure the right ownership and permissions.)
* Clear /nix/var/nix/gcroots/tmp and /nix/var/nix/temproots at boot
  time.

svn path=/nixos/trunk/; revision=23417
2010-08-25 11:59:04 +00:00
Eelco Dolstra 3f10cf70f6 * Regression test for the build hook mechanism.
svn path=/nixos/trunk/; revision=23395
2010-08-24 13:27:28 +00:00
Eelco Dolstra 21e62884e7 * switch-to-configuration.sh: Signal dbus to reload its configuration.
svn path=/nixos/trunk/; revision=22718
2010-07-23 10:52:51 +00:00
Eelco Dolstra d659488209 * Use the regular GRUB menu builder for Amazon. There are two issues:
we want to generate the GRUB menu without actually installing GRUB
  (because Amazon supplies its own pv-grub), and each menu entry
  requires "root (hd0)".  For the first, allow boot.loader.grub.device
  to be set to "nodev" to indicate that the GRUB menu should be
  generated without installing GRUB.  For the second, add an option
  boot.loader.grub.extraPerEntryConfig to allow commands to be added
  to each GRUB menu entry (in this case, "root (hd0)").

svn path=/nixos/trunk/; revision=22712
2010-07-22 14:40:29 +00:00
Eelco Dolstra b14f80c89a * The modprobe wrapper nowadays checks whether the version of the
current kernel module tree matches the booted kernel, so it should
  be safe to use after an upgrade.

svn path=/nixos/trunk/; revision=22627
2010-07-18 20:19:27 +00:00
Eelco Dolstra f3e1607758 * Don't run the emergency-shell task after nixos-rebuild because it
screws up the X server (CPU usage goes to 100%, switching virtual
  consoles no longer works, etc.).  TODO: we need some generic way to
  mark jobs that shouldn't be started automatically.

svn path=/nixos/trunk/; revision=22608
2010-07-15 12:31:18 +00:00
Eelco Dolstra a5c433696c * Put all of /var/run (not just /var/run/nscd) on a tmpfs to simplify
shutdown.  (Portmap and statd are needed during shutdown to unmount
  NFS volumes but have open files in /var/run.)
* In the shutdown job, don't kill PIDs belonging to Upstart jobs that
  are still running.  If they don't stop on the "starting shutdown"
  event, then they're needed during shutdown (such as portmap and
  statd).
* NFS test: test whether the shutdown quickly unmounts NFS volumes
  (i.e. whether portmap and statd are still running).

svn path=/nixos/branches/boot-order/; revision=22204
2010-06-09 22:29:06 +00:00
Eelco Dolstra c089738bdc * Use the shadow' package instead of pwdutils', `pam_login' and
`su'.
* The `usermod' from `shadow' allows setting a supplementary group
  equal to the user's primary group, so the special hack for the
  `nixbld' group is no longer needed.
* Removed /etc/default/passwd since it's not used by the new passwd.
  The hash is configured in pam_unix.
* Move some values for `security.setuidPrograms' and
  `security.pam.services' to the appropriate modules.

svn path=/nixos/trunk/; revision=22107
2010-06-02 21:10:48 +00:00
Eelco Dolstra 8b308272df * We don't use pam_console anymore.
svn path=/nixos/trunk/; revision=22104
2010-06-02 17:11:20 +00:00
Eelco Dolstra 95a9c5dd77 * Log the standard output/error of Upstart jobs to
/var/log/upstart/<jobname> rather than spamming the console with it.

svn path=/nixos/trunk/; revision=22093
2010-06-01 19:44:23 +00:00
Nicolas Pierron 06bfb319fe Add extra module argument to provide a nesting.clone option. This option
does the same as nesting.children except that each configuration inherits
from the top-level configuration.

svn path=/nixos/trunk/; revision=21663
2010-05-08 17:18:26 +00:00
Marc Weber 6daed6b8d2 setting default of copySystemConfiguration to false.
http://thread.gmane.org/gmane.linux.distributions.nixos/3990

svn path=/nixos/trunk/; revision=21450
2010-04-30 07:43:29 +00:00
Marc Weber d1e87dfc86 adding two new options:
- system.copySystemConfiguration (requested by Ludovic Courtès)
- system.extraSystemBuilderCmds

svn path=/nixos/trunk/; revision=21406
2010-04-28 14:55:26 +00:00
Yury G. Kudryashov a5718503e5 Change firmware handling
This way should work with both old udev and new one.

svn path=/nixos/trunk/; revision=21308
2010-04-25 18:26:56 +00:00
Lluís Batlle i Rossell a37743794d I forgot a 'toString' in front of an integer
svn path=/nixos/trunk/; revision=21242
2010-04-22 14:54:09 +00:00
Lluís Batlle i Rossell d7406769ac Making /var/run/utmp writable by the 'utmp' group.
Then, people can choose a setgid utmp for their xterm, konsole or whatever to get the terminals
reported there.


svn path=/nixos/trunk/; revision=21238
2010-04-22 13:56:26 +00:00
Yury G. Kudryashov 1e83fe6122 Remove tabs
svn path=/nixos/trunk/; revision=21104
2010-04-15 15:47:26 +00:00
Sander van der Burg 02e4a78c71 Disnix should also remain active during a switch
svn path=/nixos/trunk/; revision=20949
2010-04-05 20:35:08 +00:00
Eelco Dolstra 0432766399 * Fall back to the kernel modules used at boot time if the modules in
the current configuration don't match the running kernel.  This
  ensures that modprobe still works after a "nixos-rebuild switch" to
  a configuration that has a different kernel version.

svn path=/nixos/trunk/; revision=19696
2010-01-26 21:45:13 +00:00
Eelco Dolstra 01491abbfa * Handle the case where initScriptBuilder is not set.
svn path=/nixos/trunk/; revision=19014
2009-12-17 12:35:58 +00:00
Marc Weber 4ff6821a03 module creating /sbin/init
svn path=/nixos/trunk/; revision=19009
2009-12-17 06:04:36 +00:00
Eelco Dolstra 8d588424d2 * switch-to-configuration: force a reinstallation of GRUB whenever the
GRUB version changes.  (That's the complete version from the name
  attribute, not the boot.loader.grub.version attribute.)  The current
  version is recorded in /boot/grub/version.  This is required to
  prevent massive breakage when we change the default value of
  boot.loader.grub.version to "2".

svn path=/nixos/trunk/; revision=18997
2009-12-16 18:11:26 +00:00
Marc Weber 4d7e344f69 Adding initial version of the nixos cd insallation test script using
qemu_kvm. Installation doesn't take place yet. VM is started
printing a remote controlled "Hello".

This serves as example how to run a vm within a bulid job.

svn path=/nixos/trunk/; revision=18887
2009-12-11 00:51:13 +00:00
Eelco Dolstra f26080c5f4 * Clean up the nixos-rebuild output a bit.
svn path=/nixos/trunk/; revision=18859
2009-12-09 18:23:48 +00:00
Nicolas Pierron 82a891dc46 Add support for require attributes inside children configurations.
svn path=/nixos/trunk/; revision=18820
2009-12-05 19:21:57 +00:00
Eelco Dolstra 8e8b3f9313 * Mount /var/run/nscd only once.
svn path=/nixos/branches/upstart-0.6/; revision=18607
2009-11-24 17:25:35 +00:00
Eelco Dolstra d1bbe706a2 * Synced with the trunk.
svn path=/nixos/branches/upstart-0.6/; revision=18297
2009-11-08 21:27:53 +00:00
Lluís Batlle i Rossell de1713a24f Failing when the top level system expression cannot find the kernel image
svn path=/nixos/trunk/; revision=18291
2009-11-08 18:32:21 +00:00
Eelco Dolstra 9bf8801dc6 * Use a tmpfs for /var/run/nscd to ensure that / or /var can be
unmounted or at least remounted read-only during shutdown.  Upstart
  0.6 apparently uses nscd to do some name lookups, resulting in it
  holding some mmap mappings to deleted files in /var/run/nscd.
  E.g. lsof shows:

    init         1 root  DEL       REG              253,0          1850313 /var/run/nscd/dbyn3Piz
    init         1 root  DEL       REG              253,0          1850312 /var/run/nscd/dbt2e8PH

  See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=324900.
  This is a workaround - it would be better if Upstart didn't do this.

svn path=/nixos/branches/upstart-0.6/; revision=18258
2009-11-07 15:29:46 +00:00
Eelco Dolstra b7c519456e * Updated switch-to-configuration for Upstart 0.6.
svn path=/nixos/branches/upstart-0.6/; revision=18237
2009-11-07 01:17:56 +00:00
Eelco Dolstra b581a56d79 * Define the Upstart package to use in one place.
svn path=/nixos/branches/upstart-0.6/; revision=18187
2009-11-06 09:36:35 +00:00
Nicolas Pierron 8c5b200164 * boor.loader.grub.device can only be defined once.
* Replace an obscure piece of code by its equivalent based on the
  recursiveUpdate function.  Undefined the obsolete name of
  boot.grubDevice to avoid conflicts.

svn path=/nixos/trunk/; revision=18049
2009-10-30 11:57:23 +00:00
Eelco Dolstra 11022e8d9f * Back out r17946 and 17948 because it doesn't work. I've seen it
fail to update /etc twice now.  It's also unnecessarily complex
  IMHO (see nix-dev).

svn path=/nixos/trunk/; revision=18045
2009-10-30 08:37:08 +00:00
Michael Raskin 893f13bb14 Some boot optimisations attempted. My system boots a few times faster now, and I cannot see how these can break things.
svn path=/nixos/trunk/; revision=17946
2009-10-23 20:30:12 +00:00
Eelco Dolstra 5dfaf565bf * On the CD or on a newly installed system, create the root account
with an empty password, rather than with a hashed empty password.
  The latter is a security risk, because it allows remote root logins
  if a user enables sshd before setting a proper root password.
* Allow empty passwords for login and slim, but nothing else.

svn path=/nixos/trunk/; revision=17833
2009-10-15 14:41:59 +00:00
Ludovic Courtès f9541e0d12 Add GRUB 2 support.
svn path=/nixos/trunk/; revision=17792
2009-10-13 21:39:18 +00:00
Eelco Dolstra 636a9e7e32 * Add rename clauses for the old Grub options.
* Renamed some of the new Grub options to more sensible names
  (e.g. extraGrubEntries to extraEntries, bootMount to bootDevice,
  etc.).

svn path=/nixos/trunk/; revision=17494
2009-09-29 09:50:38 +00:00
Lluís Batlle i Rossell 75f6cd20da Making modular my previous changes for armv5tel. I updated the way to use
grub. Its options are no more inside 'boot', but inside 'boot.loader.grub'.
I added a new bootloader configuration for nixos, generationsDir. It creates
/boot/default/{init,initrd,kernel,system} symlinks, and the same for the generations
in /boot/system-$gen/{init,initrd,kernel,system}.

I can program the u-boot loader to load /boot/default files always, and have
a minimal nixos boot loader installer functionality. Additionally, I can refer
to the other system generations easily, with a simple 'ls' in /boot.

svn path=/nixos/trunk/; revision=17460
2009-09-27 21:51:37 +00:00
Eelco Dolstra c5d45514a1 * Don't restart dbus, since that causes ConsoleKit to forget about
current sessions.

svn path=/nixos/trunk/; revision=17452
2009-09-26 21:00:47 +00:00
Eelco Dolstra 693e017bfe * HAL expects a /media directory for mounting removable media.
svn path=/nixos/trunk/; revision=17437
2009-09-26 10:27:47 +00:00
Lluís Batlle i Rossell ff1a79ed88 Fixing the top-level expression not to boot only from uImage, but keep on
booting vmlinuz in non armv5tel.

svn path=/nixos/trunk/; revision=17393
2009-09-23 20:51:09 +00:00
Lluís Batlle i Rossell 8b9f510b08 Removing grub from the system expression for armv5tel-linux.
svn path=/nixos/trunk/; revision=17392
2009-09-23 20:51:00 +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