Commit graph

295 commits

Author SHA1 Message Date
Eelco Dolstra 3c6e0fd594 Generate the binary hardware database required by systemd 196 2012-11-29 18:51:44 +01:00
Eelco Dolstra 60bf4c3cd7 Add a GRUB 1 dependency
http://hydra.nixos.org/build/3331139
2012-11-16 16:42:45 +01:00
Eelco Dolstra 1f401a0e35 Make install-grub.pl work when $PATH is empty 2012-11-15 22:54:43 +01:00
aszlig a333f7212e systemd: Fail if kernel features are missing.
This has rendered my system unbootable, because I forgot to enable AUTOFS4 in my
custom kernel. In addition to AUTOFS4, this includes (hopefully) all other
kernel features needed by systemd, as listed in the README:

REQUIREMENTS:
  Linux kernel >= 2.6.39
    with devtmpfs
    with cgroups (but it's OK to disable all controllers)
    optional but strongly recommended: autofs4, ipv6

Autofs4 is not a requirement here, but in our case it turns out that the system
is not able to boot properly with a LUKS-enabled system (or at least not on _my_
system).

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2012-11-06 11:25:43 +01:00
Eelco Dolstra 458f36f5f1 Turn fileSystems into an attribute set
So now you can write

  fileSystems =
    [ { mountPoint = "/";
        device = "/dev/sda1";
      }
    ];

as

  fileSystems."/".device = "/dev/sda1";
2012-11-02 18:02:12 +01:00
Eelco Dolstra 93f82dfeef Remove outdated comment about EC2 booting into stage-2 directly 2012-11-02 17:07:53 +01:00
Eelco Dolstra af4e176c12 Fix description 2012-11-02 14:10:06 +01:00
Eelco Dolstra 48a0ea0513 Make Apache wait for ‘charon send-keys’
(This is a no-op on non-Charon deployments since the ‘keys.target’
unit won't have any dependencies.)
2012-11-01 23:32:12 +01:00
Eelco Dolstra 1da362b34b Fix coverage data collection
http://hydra.nixos.org/build/3253046
2012-10-30 17:27:14 +01:00
Eelco Dolstra 1a82024dd8 In the tests, don't start agetty on /dev/ttyS0
Running agetty on ttyS0 interferes with the backdoor, which uses ttyS0
as its standard error.  After agetty starts, writes to the stderr file
descriptor will return EIO (though doing "exec 2>/proc/self/fd/2" will
miracuously fix this).

http://hydra.nixos.org/build/3252782
2012-10-29 21:10:00 +01:00
Eelco Dolstra b3c5d42b1d Don't create /var/log/upstart 2012-10-26 16:22:18 +02:00
Eelco Dolstra e5fa3f108e Set uniqueness constraint on boot.devShmSize etc. 2012-10-23 07:50:23 -04:00
Eelco Dolstra b4a1893cdd systemd-vconsole-setup: Don't put the X server in non-raw mode
‘systemd-vconsole-setup’ by default operates on /dev/tty0, the
currently active tty.  Since it puts /dev/tty0 in Unicode or ASCII
mode, if the X server is currently active when it runs, keys such as
Alt-F4 won't reach the X server anymore.  So use /dev/tty1 instead.
2012-10-18 11:58:37 -04:00
Eelco Dolstra a4cad32c3d Generate more user-friendly script filenames
This is primarily important in journal entries.
2012-10-18 11:58:37 -04:00
Eelco Dolstra 53f216885f Ignore systemd-modules-load errors
On NixOS, ‘boot.kernelModules’ has historically contained modules that
may not exist or load everywhere, so don't barf on those.
2012-10-12 17:39:06 -04:00
Eelco Dolstra 12d1cd87ce Systemd unit names can contain Nix-illegal characters, so don't include them 2012-10-12 17:32:05 -04:00
Eelco Dolstra 97a2de983b Ensure that swap.target is pulled in by switch-to-configuration even if it failed earlier 2012-10-12 16:38:00 -04:00
Eelco Dolstra b968244aa1 Move fs.target to filesystems.nix 2012-10-12 15:08:44 -04:00
Eelco Dolstra d63da5892c Ensure that systemd-modules-load is restarted when boot.kernelModules changes 2012-10-11 17:58:46 -04:00
Eelco Dolstra b606165bd9 Allow a unit to declare "triggers" that force a restart
The triggers are just arbitrary strings that are included in the unit
under X-Restart-Triggers.  The idea is that if they change between
reconfigurations, switch-to-configuration will restart the unit
because its store path changed.  This is mostly useful for services
that implicitly depend on generated files in /etc.  Thus you can say

  restartTriggers = [ confFile ];

where ‘confFile’ is the derivation that generated the /etc file in
question.
2012-10-11 17:54:43 -04:00
Eelco Dolstra 4104f60800 Fix accidental commit 2012-10-11 12:43:08 -04:00
Eelco Dolstra d7458b5fc2 Split the monolithic network-interface service into multiple units
For each statically configured interface, we now create a unit
‘<interface>-cfg.service’ which gets started as soon as the network
device comes up.  Similarly, each bridge defined in
‘networking.bridges’ and virtual interface in ‘networking.interfaces’
is created by a service ‘<interface>.service’.

So if we have

  networking.bridges.br0.interfaces = [ "eth0" "eth1" ];
  networking.interfaces =
    [ { name = "br0";
        ipAddress = "192.168.1.1";
      }
    ];

then there will be a unit ‘br0.service’ that depends on
‘sys-subsystem-net-devices-eth0.device’ and
‘sys-subsystem-net-devices-eth1.device’, and a unit ‘br0-cfg.service’
that depends on ‘sys-subsystem-net-devices-br0.device’.
2012-10-10 17:55:42 -04:00
Eelco Dolstra 62b707de07 Add support for postStop scripts 2012-10-10 17:55:13 -04:00
Eelco Dolstra 17a7f48364 Add an option for BindsTo dependencies 2012-10-10 16:50:41 -04:00
Eelco Dolstra d71c0bb834 Respect partOf etc. for socket and target units 2012-10-09 15:14:15 -04:00
Eelco Dolstra f451afea8f Remove ‘services.journald.logKernelMessages’
This option no longer exists in systemd.
2012-10-08 10:51:17 -04:00
Eelco Dolstra fdea3ac3d2 stage-2-init: Don't rely on groups being initialised 2012-10-04 16:15:30 -04:00
Eelco Dolstra 666620cdd5 Use ‘mountpoint -q’ 2012-10-02 10:32:56 -04:00
Eelco Dolstra 2cf5e3cb66 Add options ‘boot.systemd.targets’ and ‘boot.systemd.sockets’ 2012-10-01 18:58:11 -04:00
Eelco Dolstra 13d747c11a Support postStart scripts in service units 2012-10-01 16:45:49 -04:00
Eelco Dolstra 891be375b5 Make unitConfig/serviceConfig attribute sets
So instead of:

  boot.systemd.services."foo".serviceConfig =
    ''
      StartLimitInterval=10
      CPUShare=500
    '';

you can say:

  boot.systemd.services."foo".serviceConfig.StartLimitInterval = 10;
  boot.systemd.services."foo".serviceConfig.CPUShare = 500;

This way all unit options are available and users can set/override
options in configuration.nix.
2012-10-01 16:27:42 -04:00
Eelco Dolstra 353522ef79 Remove JoinControllers line because upstream reverted joining cpuset 2012-10-01 14:33:01 -04:00
Eelco Dolstra 3ad370ae0a Merge remote-tracking branch 'origin/master' into systemd
Conflicts:
	modules/misc/ids.nix
	modules/services/mail/postfix.nix
	modules/services/system/nscd.nix
	modules/services/x11/desktop-managers/xfce.nix
	modules/system/boot/stage-1.nix
2012-09-28 11:35:27 -04:00
Eelco Dolstra 3e6bb7d1de Move setting ownership of /nix/store to stage-2-init
This is necessary because the store might be bind-mounted read-only.
2012-09-28 10:59:58 -04:00
Eelco Dolstra a139fa14b1 Optionally make the Nix store read-only to enforce immutability
This will be the default once Nix 1.2 is released.
2012-09-25 16:33:21 -04:00
Shea Levy bf116c7876 busyboxKeymap: Support unicode keymaps 2012-09-24 17:15:26 -04:00
Peter Simons 573b6b710f Merge pull request #26 from aszlig/boottime-keymap
stage-1: Add option to load keymap during bootup.
2012-09-24 07:33:03 -07:00
Eelco Dolstra 1ad655bdcf Don't join the cpuset controller with cpu/cpuacct
This works around the problem described here:

http://lists.freedesktop.org/archives/systemd-devel/2012-September/006648.html
2012-09-21 22:56:13 -04:00
Eelco Dolstra 83c6b1cf3a Set $LOCALE_ARCHIVE in systemd services
Systemd sets locale variables like $LANG when running services, so
$LOCALE_ARCHIVE should also be set to prevent warnings like "perl:
warning: Setting locale failed.".
2012-09-18 18:12:39 -04:00
Eelco Dolstra aac6fe44b6 Merge branch 'master' of github.com:NixOS/nixos into systemd 2012-09-11 10:58:57 -04:00
Mathijs Kwik bce1cdd59c fix kernel 3.4+ early cifs mounting (qemu-vm target)
kernel 3.4+ needs cifs-utils to mount CIFS filesystems.
the kernel itself (and busybox's cifs mount code) are no longer able
to do this in some/most cases and will error out saying:
"CIFS VFS: connecting to DFS root not implemented yet"

Nixos' qemu-vm target is hurt by this, as it wants to mount /nix/store
via cifs very early in the boot process.

This commit makes sure the initrd for affected kernels is built with
cifs-utils if needed.
2012-08-30 18:31:45 +02:00
Mathijs Kwik aba9f76105 change permission of /run/lock to allow non-root access to subdirectories 2012-08-26 10:17:22 +02:00
Eelco Dolstra b02c488fde Automatically append ".service" to the name of service units 2012-08-23 10:25:27 -04:00
Eelco Dolstra 223f04b3ca Add option ‘boot.systemd.packages’ to use units from the specified packages 2012-08-21 11:28:47 -04:00
Eelco Dolstra 08f14b33c1 Merge branch 'master' of github.com:NixOS/nixos into systemd 2012-08-20 11:27:38 -04:00
Eelco Dolstra a44e575196 switch-to-configuration: Respect the ‘restartIfChanged’ attribute 2012-08-17 13:14:42 -04:00
Eelco Dolstra 7e99541afe Fix initrd for the latest lvm2 2012-08-16 15:37:13 -04:00
Eelco Dolstra d18c2afc6f Add an ip-up target for services that require IP connectivity 2012-08-15 15:38:52 -04:00
Eelco Dolstra 981347429a Add support for PartOf dependencies 2012-08-15 15:36:54 -04:00
Eelco Dolstra a133eb5991 Add some missing targets
Also make multi-user.target pull in remote-fs.target to mount remote
filesystems.
2012-08-14 18:14:48 -04:00