Commit graph

604 commits

Author SHA1 Message Date
Eelco Dolstra b825169404 Add kexec support
You can now do a fast reboot (bypassing the BIOS, which may take
several minutes on servers) by running ‘systemctl kexec’.

Unfortunately the QEMU test for this is unreliable due to a QEMU bug
(it randomly crashes with a message like ‘Guest moved used index from
8 to 0’), so it's commented out.
2013-09-16 17:42:13 +02:00
Eelco Dolstra 17457297cb Update all legacy-style modules
I.e., modules that use "require = [options]".  Nowadays that should be
written as

  {
    options = { ... };
    config = { ... };
  };

Also, use "imports" instead of "require" in places where we actually
import another module.
2013-09-04 13:05:09 +02:00
Mathijs Kwik 388f1d48fb do not activate hybrid-sleep during config switches 2013-08-31 12:05:50 +02:00
Marc Weber d97ea69a81 systemd: check service.name.Type and service.name.Restart 2013-08-15 09:19:51 +03:00
Ivan Kozik 390fdb3e60 Fix typos, especially those that end up in the NixOS manual 2013-08-10 21:07:13 +00:00
Eelco Dolstra 4a83c97d3d Stage 1: Use modprobe from kmod instead of module-init-tools
The latter is obsolete.

http://hydra.nixos.org/build/5663799
2013-08-07 18:30:30 +02:00
Eelco Dolstra 438b057eb3 Lower the default console log level
It used to be set to 7 (debug) so you get lots of crap on the console.
The new value of 4 is also what Ubuntu uses.  Red Hat uses 3.

A nice side effect is that it's more likely that the LUKS passphrase
prompt doesn't get clobbered by kernel log messages.
2013-07-23 22:18:25 +02:00
Eelco Dolstra 8dc09be07b Fix indentation / tabs 2013-07-23 22:18:25 +02:00
Bjørn Forsman 8d596006dd Ensure /var/log/journal permission bits are set
Ensure permission bits are (re)set on each system activation with
explicit chmod call.

mkdir -m MODE PATH will only set the permission bits if PATH is
*created*, which means users that have old NixOS versions will continue
to have the old 700 permissions on /var/log/journal until they chmod
manually. With this commit the permissions will be set to 755 on system
activation.
2013-07-22 20:09:50 +02:00
Eelco Dolstra c52fd85990 Set permissions on /var/log/journal properly
This makes the system journal readable by users in the
systemd-journal, wheel and adm groups.  It also allows users to read
their own journals.

Note that this doesn't change the permissions of existing journals.
2013-07-19 21:18:44 +02:00
Eelco Dolstra bf21bbcf01 Mount /var and some other filesystems automatically in stage 1
Bad things happen if /var is mounted in a late stage.
2013-07-19 17:24:18 +02:00
Eelco Dolstra 2d57847f16 NFS: Use network-online.target instead of remote-fs-pre.target
Turns out that remote-fs-pre.target is not actually "wanted" anywhere,
so statd is not started before remote filesystems are mounted.  But
remote filesystems do "want" network-online.target, so we can use that
to pull in statd and idmapd.

Not sure if this is really the right thing to do, but it works for
now.  Background:

  https://bugzilla.redhat.com/show_bug.cgi?id=787314

http://hydra.nixos.org/build/5542230
2013-07-16 11:55:12 +02:00
aszlig ff84facca3
grub: Add mdadm to search path.
Grub uses mdadm to find out the device it is on, especially when mdadm itself
resides in a separate boot partition. When bootstrapping from a NixOS
installation CD, it's not a big issue because usually the paths from the Nix
store of the installation CD are matching with the ones in the chrooted
environment.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2013-07-08 14:29:37 +02:00
Eelco Dolstra 7810f7f61a Build unit files locally 2013-06-20 19:39:09 +02:00
Eelco Dolstra d210f30fa7 Omit GRUB if boot.loader.grub.device is set to "nodev"
If we only need to generate a GRUB boot menu, we don't need GRUB
itself.  This cuts 38 MiB from EC2 system closures (in particular
because it gets rid of the need for the 32-bit Glibc).
2013-06-04 14:07:25 +02:00
Rickard Nilsson 70586f03fe systemd.sockets: Add listenStreams option for specifying several sockets 2013-05-20 16:26:24 +02:00
Eelco Dolstra 95d02c0c40 initrd: Remove serio and atkbd
These modules don't exist as far as I can tell.
2013-05-15 12:52:15 +02:00
Eelco Dolstra b3ae70ddb6 initrd: Add ehci_pci and hid_generic
These are required to get some (all?) USB keyboards to work in recent
kernels.
2013-05-15 12:52:14 +02:00
Shea Levy 51bc82960a btrfsck doesn't respect any flags
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-05-13 14:25:48 -04:00
Eelco Dolstra ffb581c739 Fix suspend in systemd
Systemd 203 expects the file /etc/systemd/sleep.conf to exist,
otherwise suspend doesn't work.
2013-05-09 16:26:13 +02:00
Eelco Dolstra ebac0220d1 systemd.nix: Use environment.etc attribute syntax 2013-05-09 16:26:12 +02:00
Phreedom 6c988a593a Merge pull request #136 from MarcWeber/submit/grubDevice
s/boot.grubDevice/boot.loader.grub.device/ to shut down warnings
2013-05-05 07:41:22 -07:00
Shea Levy 17f10f70ad Include xhci_hcd in the initrd for usb3 devices
Fixes #158, I don't think there is an `xhci' module

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-05-04 11:35:01 -04:00
Shea Levy 2415787040 gummiboot: Fix bug where old conf scripts for single-digit generations weren't removed
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-04-30 13:03:14 -04:00
Mathijs Kwik 8de00c328a systemd: add "requiredBy" option.
"require" is a stronger version of "want",
and just like wantedBy allows you to specify this relation in reverse,
requiredBy does the same.

It may seem pointless to be able to specify these stronger relations in
reverse, because if something is really required, you would expect the
other unit to specify this himself.

However, this is still useful for virtual/automatic units (like
devices) that are created by systemd on demand and hence have no unit
file you can alter.
2013-04-22 14:24:15 +02:00
Lluís Batlle i Rossell 3be4fd3f38 Making grub display 'All configurations', not 'Old'
That confused some people, as the first generation shown is
the 'current'.
2013-04-16 11:09:25 +02:00
Marc Weber 9bf073b58b s/boot.grubDevice/boot.loader.grub.device/ to shut down warnings 2013-04-10 23:54:37 +02:00
Eelco Dolstra 86f11dadaa switch-to-configuration: Use full path to sync 2013-04-08 17:34:14 +02:00
Eelco Dolstra ee29054da1 Create an empty /etc/resolv.conf to shut up nscd 2013-04-03 13:27:41 +02:00
Eelco Dolstra f40a38b2c8 Remove /etc lock files at boot time 2013-03-31 15:40:13 +02:00
Eelco Dolstra fbde5e027e Sync after installing the boot loader
Previously we synced just before calling switch-to-configuration.
That prevents corruption of the Nix store, but it can leave the boot
loader configuration and kernel files in /boot corrupted.  So do the
sync after installing the boot loader.
2013-03-28 16:11:54 +01:00
Eelco Dolstra 9000fd81d5 Hack: force timers.target to be started
Usually timers.target is pulled in by basic.target, but we don't
restart basic.target.  So timers.target wouldn't be started when
coming from an older systemd.
2013-03-28 15:02:11 +01:00
Eelco Dolstra 7ad91f31d6 Add support for systemd timers 2013-03-28 11:54:19 +01:00
Eelco Dolstra c039e286b9 Set the kernel.poweroff_cmd sysctl
This allows Xen (and EC2) to power off an instance properly.  We had
this before (see aeb89fc753), but it got
lost in the systemd migration.
2013-03-27 23:03:37 +01:00
Eelco Dolstra f3bea050f8 Updates for systemd 198/199 2013-03-27 23:03:37 +01:00
Shea Levy 652e2ab610 "Maintain" the tested job so I get notifications when it fails
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-03-26 12:35:28 -04:00
Shea Levy 89dd7b0f69 Revert "Don't mount /nix/store ro if it's a mountpoint"
Now that nixUnstable supports remounting in the "/nix/store is a
mountpoint" case, this is no longer necessary.

This reverts commit f1d48aec43.

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-03-26 12:20:06 -04:00
Nicolas B. Pierron 8b2256686b Merge pull request #123 from MarcWeber/feed-upstream/toList
replace list by listOf using same style as for attrsOf
2013-03-23 16:21:21 -07:00
Peter Simons c5ba924143 Revert "Add /run/nss to LD_LIBRARY_PATH".
Commit c948494342 exports too many shared
objects into the LD_LIBRARY_PATH, which causes problems with mplayer.
2013-03-21 11:25:25 +01:00
Marc Weber f3e6b42258 replace list by listOf using same style as for attrsOf 2013-03-14 17:09:21 +01:00
Peter Simons 8f679fef5b Merge pull request #116 from rickynils/nss
Add /run/nss to LD_LIBRARY_PATH
2013-03-13 02:57:32 -07:00
Shea Levy d67d3b5b6a extraModprobeConfig: set type to types.lines
This makes it so multiple definitions are merged by adding a newline
between each entry, to avoid the need to add a newline to the end of
every definition of extraModprobeConfig. See #119 for an example of an
issue this has caused.

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-03-12 05:51:45 -04:00
Shea Levy f1d48aec43 Don't mount /nix/store ro if it's a mountpoint
In principle this could work, but the current remount logic in nix fails
to remount mountpoints that are root in their own filesystem (as would
be the case with bind-mounting a mountpoint over itself). nixos/nix#98
is aimed at fixing this.

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-03-08 10:42:34 -05:00
Shea Levy bc21ccc981 readonly-mountpoint: Remove unusued variable 2013-03-07 19:05:54 -05:00
Shea Levy 6d6d3d4228 readOnlyStore: Don't do a read-only bind-mount of an already read-only store.
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-03-07 19:00:21 -05:00
Rickard Nilsson c948494342 Add /run/nss to LD_LIBRARY_PATH
This fixes issues with glibc-binaries (getent for example) that can't
find NSS modules that are not distributed with glibc.

See this discussion:
http://comments.gmane.org/gmane.linux.distributions.nixos/9940
2013-03-07 16:54:42 +01:00
Mathijs Kwik 09680dec6a read-only-store functionality should apply even when /nix/store is on a separate filesystem 2013-03-04 22:46:06 +01:00
Mathijs Kwik 134750f6ac gummiboot: fix typo 2013-03-04 22:46:06 +01:00
Mathijs Kwik e05a37d736 rename deprecated option 2013-03-04 22:46:06 +01:00
Bjørn Forsman ec2378f07b systemd-logind: fix config file header: [Logind] => [Login]
man logind.conf clearly states that the header is [Login] (no 'd').
Without this fix services.logind.extraConfig does not take effect
because logind ignores the invalidly named section.
2013-03-02 19:45:47 +01:00