Commit Graph

42179 Commits

Author SHA1 Message Date
Eelco Dolstra
48d90cf3b6 Revert "Put /nix/var/nix/{temproots,userpool} on a tmpfs"
This reverts commit dd49094a25. Nix
barfs if /nix/var/nix/temproots is a symlink :-(
2014-04-18 18:37:07 +02:00
Eelco Dolstra
1e540af43b Fix broken upstream user unit symlinks 2014-04-18 17:38:06 +02:00
Eelco Dolstra
85fdaed9de ssh-agent: Tweaks 2014-04-18 17:37:47 +02:00
Eelco Dolstra
fec3bc85a6 postgresql: Use systemd's new "mixed" kill mode
"Mixed" mode sends the initial SIGINT only to the main process, but
sends the SIGKILL after the time-out expires to the entire cgroup.
2014-04-18 17:32:24 +02:00
Eelco Dolstra
16bba2db2e Use "machinectl poweroff" to shut down containers 2014-04-18 17:11:59 +02:00
Eelco Dolstra
f9423208c2 Containers: Don't warn about not having a boot loader 2014-04-18 17:00:11 +02:00
Eelco Dolstra
dd49094a25 Put /nix/var/nix/{temproots,userpool} on a tmpfs 2014-04-18 16:56:20 +02:00
Eelco Dolstra
c13cede19d Remove long-obsolete /nix/var/nix/chroots directory 2014-04-18 16:50:37 +02:00
Eelco Dolstra
21573af9fb Containers: Use /etc/resolv.conf supplied by the host
This used to work with systemd-nspawn 203, because it bind-mounted
/etc/resolv.conf (so openresolv couldn't overwrite it). Now it's just
copied, so we need some special handling.
2014-04-18 16:48:11 +02:00
Eelco Dolstra
5c62d3d26b nixos-rebuild: Handle $SHELL not being bash 2014-04-18 16:05:20 +02:00
Eelco Dolstra
da774bced5 Remove dhcpcd_without_udev attribute 2014-04-18 15:36:06 +02:00
Eelco Dolstra
890d0cc3a5 firmware-linux-nonfree: Update to 0.41 2014-04-18 15:34:10 +02:00
Eelco Dolstra
4c764479a6 Remove redundant space 2014-04-18 14:59:59 +02:00
Eelco Dolstra
359935a1ef kmod-static-nodes: Drop superfluous wantedBy 2014-04-18 14:51:18 +02:00
Eelco Dolstra
9bb40b7a5b Pull in nix-daemon.socket
This led to the container test failing, which made no sense
whatsoever, until I realized nix-daemon.socket creates the socket
directory as a side effect, which systemd-nspawn then bind-mounts.

http://hydra.nixos.org/build/10397575
2014-04-18 14:50:07 +02:00
Eelco Dolstra
d43b536ab6 Work around apparent dhcpcd bug 2014-04-18 02:43:00 +02:00
Eelco Dolstra
f7d28f7cd6 Slight test speedup
Don't do a pointless ARP check in dhcpcd.
2014-04-18 02:40:01 +02:00
Eelco Dolstra
64b968f81f Remove debug line 2014-04-18 02:31:10 +02:00
Eelco Dolstra
12f06ae499 Doh 2014-04-18 01:36:43 +02:00
Eelco Dolstra
9f65e82b59 Make the login test a bit more robust
http://hydra.nixos.org/build/10397037
2014-04-18 01:22:38 +02:00
Eelco Dolstra
ffedee6ed5 Start ssh-agent as a user unit
This has some advantages:

* You get ssh-agent regardless of how you logged in. Previously it was
  only started for X11 sessions.

* All sessions of a user share the same agent. So if you added a key
  on tty1, it will also be available on tty2.

* Systemd will restart ssh-agent if it dies.

* $SSH_AUTH_SOCK now points to the /run/user/<uid> directory, which is
  more secure than /tmp.

For bonus points, we should patch ssh-agent to support socket-based
activation...
2014-04-18 00:45:26 +02:00
Eelco Dolstra
e34a1589fe Add support for user units
With ‘systemd.user.units’ and ‘systemd.user.services’, you can specify
units used by per-user systemd instances.  For example,

  systemd.user.services.foo =
    { description = "foo";
      wantedBy = [ "default.target" ];
      serviceConfig.ExecStart = "${pkgs.foo}/bin/foo";
    };

declares a unit ‘foo.service’ that gets started automatically when the
user systemd instance starts, and is stopped when the user systemd
instance stops.

Note that there is at most one systemd instance per user: it's created
when a user logs in and there is no systemd instance for that user
yet, and it's removed when the user fully logs out (i.e. has no
sessions anymore). So if you're simultaneously logged in via X11 and a
virtual console, you get only one copy of foo.
2014-04-18 00:38:40 +02:00
Eelco Dolstra
073351a5cf Refactor unit option declarations
This gets rid of some duplication.
2014-04-17 23:35:05 +02:00
Eelco Dolstra
2ad6933a22 Remove special handling of systemd-journal-gatewayd 2014-04-17 19:05:29 +02:00
Eelco Dolstra
179acfb664 Allow upstream systemd units to be extended
If you define a unit, and either systemd or a package in
systemd.packages already provides that unit, then we now generate a
file /etc/systemd/system/<unit>.d/overrides.conf. This makes it
possible to use upstream units, while allowing them to be customised
from the NixOS configuration. For instance, the module nix-daemon.nix
now uses the units provided by the Nix package. And all unit
definitions that duplicated upstream systemd units are finally gone.

This makes the baseUnit option unnecessary, so I've removed it.
2014-04-17 18:52:31 +02:00
Eelco Dolstra
8dcf76480c firewall: Order after systemd-modules-load.service
This ensures that connection tracking modules are loaded on time.
2014-04-17 18:10:20 +02:00
Eelco Dolstra
bfda72c2f9 Fix waitForX 2014-04-17 17:07:03 +02:00
Eelco Dolstra
560a1103ad Add option ‘systemd.tmpfiles.rules’
This allows specifying rules for systemd-tmpfiles.

Also, enable systemd-tmpfiles-clean.timer so that stuff is cleaned up
automatically 15 minutes after boot and every day, *if* you have the
appropriate cleanup rules (which we don't have by default).
2014-04-17 16:14:56 +02:00
Eelco Dolstra
bb9304e280 Remove creation of /tmp/.ICE-unix
This is now done by tmpfiles.
2014-04-17 16:14:56 +02:00
Mathijs Kwik
c1e638abb6 systemd: oneshot units should be allowed to restart on failure/abort 2014-04-17 15:20:39 +02:00
Eelco Dolstra
d17af6b9a8 dhcpcd: Update to 6.3.2 2014-04-17 14:53:48 +02:00
Eelco Dolstra
7ea51b1c6c Enable kmod-static-nodes.service
This creates static device nodes such as /dev/fuse or
/dev/snd/seq. The kernel modules for these devices will be loaded on
demand when the device node is opened.
2014-04-17 14:35:05 +02:00
Eelco Dolstra
9594421617 kmod: Respect $MODULE_DIR in ‘kmod static-nodes’ 2014-04-17 13:52:30 +02:00
Eelco Dolstra
51a1e0a4a9 kmod: Update to 17 2014-04-17 13:46:48 +02:00
Eelco Dolstra
317a81ada2 Enable systemd-tmpfiles 2014-04-17 13:23:06 +02:00
Eelco Dolstra
518f710547 Fix module loading in systemd-udevd 2014-04-17 12:26:12 +02:00
Eelco Dolstra
89155dbc01 systemd: Enable user systemd instances 2014-04-17 12:03:04 +02:00
Eelco Dolstra
5378da25a0 Apply pam_loginuid before pam_systemd
As recommended by the pam_systemd manpage.
2014-04-17 11:35:18 +02:00
Eelco Dolstra
f0a9703f77 journalctl no longer parses the flag "-bu" 2014-04-17 10:56:10 +02:00
Eelco Dolstra
eeb32fd82b Hopefully fix random failure in cups test
http://hydra.nixos.org/build/10372895
2014-04-17 10:53:08 +02:00
Eelco Dolstra
2503e7e0c8 systemd: Apply patch to make container logins work again 2014-04-16 18:15:48 +02:00
Eelco Dolstra
150d3b0095 no-x-libs.nix: Disable su xauth forwarding, and X11 dependency in dbus 2014-04-16 16:58:06 +02:00
Eelco Dolstra
c13d582c78 Make dbus overridable 2014-04-16 16:44:27 +02:00
Eelco Dolstra
c21ef84810 linux-pam: Update to 1.1.8 2014-04-16 16:44:05 +02:00
Eelco Dolstra
7438b95437 util-linux: Update to 2.24.1 2014-04-16 16:31:58 +02:00
Eelco Dolstra
c81565f6cf Remove hack for using upstream getty units
Also, enable the container-getty@ unit so that "machinectl login"
works.
2014-04-16 16:11:17 +02:00
Eelco Dolstra
c382ad1e17 Fix tests
Doing a =~ regexp check doesn't do anything in itself...
2014-04-16 16:09:32 +02:00
Eelco Dolstra
19d4e40dfc systemd: Build on i686-linux 2014-04-16 15:25:37 +02:00
Eelco Dolstra
0ac322c7a0 systemd-nspawn: Fix starting NixOS containers 2014-04-16 11:34:34 +02:00
Eelco Dolstra
e8af68d2dc Make machinectl work 2014-04-16 10:48:14 +02:00