Commit graph

2466 commits

Author SHA1 Message Date
Rickard Nilsson c6bb091b5b Rewrite NetworkManager job to systemd service 2013-01-17 12:51:52 +01:00
Eelco Dolstra 6e7b0a0c0e Fix ‘nixos-rebuikd dry-run’ 2013-01-16 16:11:51 +01:00
Eelco Dolstra e65a49f00f Add missing file 2013-01-16 16:06:50 +01:00
Eelco Dolstra f290808509 Set some missing types 2013-01-16 15:03:54 +01:00
Eelco Dolstra b35fe01f02 Set the NixOS version to something useful when building from Git 2013-01-16 14:40:41 +01:00
Eelco Dolstra ea358b4eae nixos-rebuild: Use ‘[ ... ]’ instead of ‘test’ 2013-01-16 13:21:59 +01:00
Eelco Dolstra 4d983d4955 Rename ‘system.build.systemd’ to ‘systemd.package’
This makes it cheaper to test a new systemd and is more consistent
with other modules.
2013-01-16 13:17:57 +01:00
Eelco Dolstra ae4e94d9ac Rename ‘boot.systemd’ to ‘systemd’
Suggested by Mathijs Kwik.  ‘boot.systemd’ is a misnomer because
systemd affects more than just booting.  And it saves some typing.
2013-01-16 12:33:18 +01:00
Eelco Dolstra 61f1df279f Remove bogus comment 2013-01-15 17:34:24 +01:00
Eelco Dolstra 0b399d8e49 Revert "Remove obsolete environment variables"
This reverts commit ac8080b83c.
2013-01-15 17:34:01 +01:00
Eelco Dolstra ac8080b83c Remove obsolete environment variables 2013-01-15 16:53:40 +01:00
Eelco Dolstra 5685ee5446 Add/fix systemd unit descriptions 2013-01-10 13:59:41 +01:00
Eelco Dolstra 3bbbd62cbc Start dhcpcd/wpa_supplicant after systemd-udev-settle
This is necessary to prevent a race.  Udev 197 has a new naming scheme
for network devices, so it will rename (say) eth0 to eno0.  This fails
with "error changing net interface name eth0 to eno1: Device or
resource busy" if another process has opened the interface in the
meantime.
2013-01-10 13:46:34 +01:00
Rob Vermaas 30586846ce Merge branch 'systemd' of github.com:NixOS/nixos into systemd 2013-01-09 23:01:56 +01:00
Eelco Dolstra 0b3d54d3cd Guard against portmap and rpcbind both being enabled 2013-01-09 22:53:44 +01:00
Eelco Dolstra c7b427fbca Give our kernel parameters a common prefix ("boot.*") 2013-01-09 22:53:44 +01:00
Eelco Dolstra 93a7a32bab initrd: Don't enable the root shell by default
Starting an authenticated root shell is a security hole, so don't do
it by default.  The kernel command line parameter
‘initrd.shell_on_fail’ restores the original.  (Of course, this only
improves security if you have a password on GRUB to prevent the kernel
command line from being edited by unauthorized users.)
2013-01-09 22:53:44 +01:00
Peter Simons 91bead9c18 modules/system/boot/loader/grub/memtest.nix: use 'memtest86plus' instead of 'memtest86'
The 'memtest86' package didn't work on any of my machines. 'memtest86plus', on
the other hand, seems to work just fine. Does anyone know why we keep the
seemingly older version around still?
2013-01-09 22:44:50 +01:00
Shea Levy 19127aa416 Add dd-agent module 2013-01-08 16:19:51 -05:00
Eelco Dolstra ac53b25f16 Remove handling of "debug2" and "S|s|single" kernel command line options
The "S|s|single" option is handled by systemd (starting
rescue.target).  And the rescue target basically removes the need for
a special debug shell.  (Also, there is "systemd.crash_shell=1" for
starting a shell if systemd crashes.)
2013-01-08 18:31:46 +01:00
Eelco Dolstra f4a3bdd6af Install {rescue,emergency}.{target,service}
Also, symlink kbrequest.target to rescue.target as suggested by the
systemd.special manpage.  This way, you can start a sulogin rescue
shell by pressing Alt+Up.
2013-01-08 18:24:06 +01:00
Eelco Dolstra 948dd8dd1a Use the upstream (but patched) sysinit.target 2013-01-08 17:26:51 +01:00
Eelco Dolstra 827e3dadc8 Don't special-case systemd-journald.service and systemd-user-sessions.service 2013-01-08 17:00:45 +01:00
Eelco Dolstra 884f58fa8a Include libsystemd-daemon.so.* in the initrd since dmsetup needs it
Strangely, this is only case after updating systemd to 197, I didn't
change lvm2...
2013-01-08 15:35:21 +01:00
Eelco Dolstra 81796c5baf Add a command ‘nixos-help’ that opens the NixOS manual in a browser 2013-01-08 02:13:33 +01:00
Eelco Dolstra 1541311f06 switch-to-configuration: Stop some target units to ensure proper dependency ordering
This is currently only done for network-interfaces.target, but
it should propably be done for most targets.
2013-01-07 16:06:45 +01:00
Eelco Dolstra 74bae63135 smartd: Remove unnecessary PartOf dependency 2013-01-07 16:01:22 +01:00
Eelco Dolstra da32722ade display-manager: Start after local-fs.target
We don't want users trying to log in while /home is still being
fsck'ed...
2013-01-07 16:00:10 +01:00
Eelco Dolstra 2e035ae042 Hack to prevent <interface>-cfg.service from breaking the default gateway
Restarting <interface>-cfg.service may cause the interface's IP
addresses to be flushed.  If the default gateway goes through that
interface, then the default gateway is deleted.  So we need to
restart network-setup.target.
2013-01-07 15:17:53 +01:00
Lluís Batlle i Rossell 38af598658 Simplifying defaultGatewayWindowSize according to Eelco suggestions 2013-01-06 23:20:48 +01:00
Lluís Batlle i Rossell 9a81748f20 Adding defaultGatewayWindowSize
This allows setting the max tcp window size for the route of
the default gateway (usually the internet access).

It works only for non-DHCP configurations by now.
2013-01-06 22:32:21 +01:00
Eelco Dolstra 1aea92c4ce Ensure that ‘nix.gc.options’ is subject to shell expansion 2013-01-05 01:35:26 +01:00
Eelco Dolstra 96ba0ca283 For some units, use "systemctl restart" rather than "systemctl stop/start"
During a configuration switch, changed units are stopped in the old
configuration, then started in the new configuration (i.e. after
running the activation script and running "systemctl daemon-reload").
This ensures that services are stopped using the ExecStop/ExecStopPost
commands from the old configuration.

However, for some services it's undesirable to stop them; in
particular dhcpcd, which deconfigures its network interfaces when it
stops.  This is dangerous when doing remote upgrades - usually things
go right (especially because the switch script ignores SIGHUP), but
not always (see 9aa69885f0).  Likewise,
sshd should be kept running for as long as possible to prevent a
lock-out if the switch fails.

So the new option ‘stopIfChanged = false’ causes "systemctl restart"
to be used instead of "systemctl stop" followed by "systemctl start".
This is only proper for services that don't have stop commands.  (And
it might not handle dependencies properly in some cases, but I'm not
sure.)
2013-01-05 01:05:25 +01:00
Eelco Dolstra baac242a1f Run the garbage collector as a systemd service
Running it from systemd rather than cron has several advantages:
systemd ensures that only one instance runs at a time; the GC can be
manually started/stopped; and logging goes to the journal.

We still need cron to start the service at the right time, but
hopefully soon we can get rid of cron entirely (once systemd supports
starting a unit at a specific time).
2013-01-04 14:04:41 +01:00
Eelco Dolstra f701acfac0 nix-daemon: Start "nix-daemon" rather than "nix-worker --daemon" 2013-01-04 13:50:50 +01:00
Rob Vermaas 207d30b6f3 Fix VirtualBox image generation: switch-to-configuration in chroot needs /bin/sh 2013-01-04 10:58:56 +01:00
Eelco Dolstra 9aa69885f0 Don't do readlink() on every mount point when remounting /dev etc.
Doing so causes the activation script to hang if (say) an NFS mount
point is unreachable.
2013-01-02 18:28:44 +01:00
Mathijs Kwik 7e70cffc45 systemd mount units: better handling of mandatory options 2013-01-01 14:53:54 +01:00
Mathijs Kwik ebf4816717 systemd mount units: use 'escapeSystemdPath' from lib/utils 2013-01-01 14:53:54 +01:00
Mathijs Kwik 16a9bcfe81 add support for systemd mount units
This is mainly useful for specifying mounts that depend on other
units. For example sshfs or davfs need network (and possibly
nameservices).

While systemd makes a distinction between local and remote
filesystems, this only works for in-kernel filesystems such as
nfs and cifs.

fuse-based filesystems (such as sshfs and davs) are classified as
local, so they fail without networking. By explicitly declaring these
mounts as full systemd units (as opposed to having systemd generate
them automatically from /etc/fstab), dependencies can be specified as
on every other unit.

In the future, we can probably port NixOS' filesystems handling to use
these native systemd.mount units and skip /etc/fstab altogether, but
this probably requires additional changes, such as starting systemd
even earlier during boot (stage 1).
2013-01-01 13:55:48 +01:00
Rickard Nilsson 19e8ffc43f networkmanager: Use systemctl instead of initctl 2012-12-30 19:30:18 +01:00
Mathijs Kwik 183829cf99 gogoclient: change working dir before starting
otherwise state files are placed in /
2012-12-28 10:22:49 +01:00
Mathijs Kwik 244ed6ae71 nscd: use proper systemd.special(7) targets 2012-12-27 12:23:50 +01:00
Mathijs Kwik 3456f3b232 systemd: convert gogoclient job to service unit 2012-12-27 12:23:50 +01:00
Mathijs Kwik f61f0c139b systemd: convert smartd job to service 2012-12-27 12:23:50 +01:00
Mathijs Kwik dc58c2ea37 systemd: convert samba jobs to systemd services (samba.target) 2012-12-27 12:23:50 +01:00
Mathijs Kwik 90fa68cf32 systemd: convert mongodb job to service 2012-12-27 12:23:50 +01:00
Eelco Dolstra 45f0de21f0 nixos-rebuild: Fix the check for running nix-daemon 2012-12-21 00:18:12 +01:00
Eelco Dolstra fb8af2f9b6 postgresql: Don't wait for ages in post-start if the service has failed 2012-12-21 00:18:12 +01:00
Shea Levy 3ef1432866 Update create-s3-amis and amazon-image.nix to recent nixos 2012-12-18 13:44:47 -05:00