Commit graph

60 commits

Author SHA1 Message Date
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
Mathijs Kwik 244ed6ae71 nscd: use proper systemd.special(7) targets 2012-12-27 12:23:50 +01:00
Eelco Dolstra b1da38f564 Merge remote-tracking branch 'origin/master' into systemd 2012-11-30 16:12:04 +01:00
Eelco Dolstra 9eb81d2578 Renamed tcpWrapper -> tcp_wrappers 2012-11-29 15:16:30 +01:00
Eelco Dolstra 390f5f7376 Remove the cgroups module
Cgroups are handled by systemd now.  Systemd's cgroup support does not
do all the things that cgrulesengd does, but they're likely to
interact poorly with each other.
2012-10-26 19:36:59 +02: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
Mathijs Kwik 1b47614c46 invalidate-nscd: use script instead of exec for multiple commands
otherwise, only the first one line executes
2012-09-29 10:51:28 +02: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 fcebb3f3cd Clean up the nscd job 2012-09-25 15:22:55 -04:00
Rickard Nilsson 0de3a0cff3 nscd-invalidate: Invalidate passwd and group databases also
I had some problems with LDAP user lookups not working properly
at boot. I found that invalidating passwd and group on the
ip-up event (when nscd-invalidate starts) helped a bit.
2012-09-19 14:30:55 +02:00
Eelco Dolstra 4475294f57 Fix a hang during shutdown
Subtle: dhcpcd.service would call resolvconf during shutdown, which in
turn would start invalidate-nscd.service, causing the shutdown to be
cancelled.  Instead, give nscd.service a proper reload action, and do
"systemctl reload --no-block nscd.service".  The --no-block is
necessary to prevent that command from waiting until a timeout occurs
(bug in systemd?).
2012-08-14 16:45:50 -04:00
Eelco Dolstra b11c5d5991 nscd: Ensure that invalidate-nscd starts after nscd 2012-08-06 12:26:52 -04:00
Eelco Dolstra d4fec178fd Merge remote-tracking branch 'origin/master' into systemd 2012-08-02 13:44:16 -04:00
Eelco Dolstra 2678ff3726 Use /sys/fs/cgroup instead of /dev/cgroup 2012-07-30 13:49:18 -04:00
Eelco Dolstra 77510eaa99 dbus.nix: Fix path to dbus-send 2012-07-20 17:38:36 -04:00
Eelco Dolstra 42ee3b4209 Add a ‘wantedBy’ attribute to unit definitions
This attribute allows a unit to make itself a dependency of another unit.

Also, add an option to set the default target unit.
2012-06-17 23:31:21 -04:00
Eelco Dolstra 4a95f8996b To ease migration to systemd, generate units from the ‘jobs’ option
Also get rid of the ‘buildHook’ job option because it wasn't very useful.
2012-06-16 00:19:43 -04:00
Eelco Dolstra a46894b960 Get lots more systemd stuff working
Enabled a bunch of units that ship with systemd.  Also added an option
‘boot.systemd.units’ that can be used to define additional units
(e.g. ‘sshd.service’).
2012-06-14 18:44:56 -04:00
Eelco Dolstra e4200d7e61 * Some more trivial builders with lots of dependencies that should be
built locally.

svn path=/nixos/trunk/; revision=34034
2012-05-09 21:35:47 +00:00
Eelco Dolstra 64241a3e90 * Flush nscd when switching to a new configuration.
svn path=/nixos/trunk/; revision=33441
2012-03-27 14:35:45 +00:00
Eelco Dolstra 86d8d62d16 * Allow Upstart jobs to declare that they shouldn't be restarted by
switch-to-configuration.  E.g. the X server shouldn't be restarted
  because that kills all the X clients.

svn path=/nixos/trunk/; revision=33223
2012-03-18 02:10:39 +00:00
Eelco Dolstra 573877c1ac * Use boot.kernelModules everywhere instead of explicit calls to
modprobe.
* Move the implementation of boot.kernelModules from the udev job to
  the activation script.  This prevents races with the udev job.
* Drop references to the "capability" kernel module, which no longer
  exists.

svn path=/nixos/trunk/; revision=33208
2012-03-17 17:26:17 +00:00
Eelco Dolstra 29b6b8769f * On second thought, let's not enable user support in Upstart. The
first user job I put in ~/.init caused Upstart to crash with an
  assertion failure, taking down the system.  Given that Upstart has a
  non-trivial attack surface with this feature, it seems best to
  disable it.

svn path=/nixos/trunk/; revision=32779
2012-03-04 17:49:00 +00:00
Eelco Dolstra 545f922e71 * Connect Upstart to the system bus so that non-root users can run
initctl.

svn path=/nixos/trunk/; revision=32768
2012-03-04 15:10:14 +00:00
Eelco Dolstra aca8225e3b * Invalidate the nscd hosts cache when an "ip-up" event occurs. This
event is emitted by dhclient and by the network-interfaces job in
  case of statically configured interfaces.  Invalidating the cache is
  necessary to get rid of negative queries.

svn path=/nixos/trunk/; revision=31779
2012-01-21 19:13:43 +00:00
Eelco Dolstra 8eba736da9 * Use the ‘path’ attribute in Upstart jobs in more places. It's a bit
more readable (also in "ps" output).

svn path=/nixos/trunk/; revision=30565
2011-11-25 16:32:54 +00:00
Eelco Dolstra 1d5d7036d0 * Add a module for managing cgroups.
svn path=/nixos/trunk/; revision=30551
2011-11-24 18:28:45 +00:00
Peter Simons 20b364f4de Reverting revisions 30103-30106: "always set nixpkgs.config.{state,store}Dir", etc.
After the change from revision 30103, nixos-rebuild suddenly consumed
freaky amounts of memory. I had to abort the process after it had
allocated well in excess of 30GB(!) of RAM. I'm not sure what is causing
this behavior, but undoing that assignment fixes the problem. The other
two commits needed to be revoked, too, because they depend on 30103.

svn path=/nixos/trunk/; revision=30127
2011-10-30 15:19:58 +00:00
Shea Levy 09cf6ce70c find modules | fgrep .nix | fgrep -v .svn | fgrep -v nixpkgs.nix | xargs sed -i -e 's|/nix/var|${config.nixpkgs.config.nix.stateDir}|g' -e 's|/nix/store|${config.nixpkgs.config.nix.storeDir}|g'
Don't assume /nix/store or /nix/var in NixOS modules, this is configurable

svn path=/nixos/trunk/; revision=30104
2011-10-29 21:03:57 +00:00
Peter Simons eb6e1310b8 strip trailing whitespace; no functional change
svn path=/nixos/trunk/; revision=29285
2011-09-14 18:20:50 +00:00
Yury G. Kudryashov bcee582a74 Preserve <standard_session_service_dirs/> in dbus.conf
This way *session* dbus daemon loads services from XDG_DATA_DIRS

svn path=/nixos/trunk/; revision=29106
2011-09-07 23:07:05 +00:00
Yury G. Kudryashov 42a03ef0eb Sync with dbus changes in nixpkgs
svn path=/nixos/trunk/; revision=28832
2011-08-26 13:46:59 +00:00
Yury G. Kudryashov e5917ea6fc Merge with udev-173
The only conflict was the addition of two different options at the same place.

svn path=/nixos/trunk/; revision=28801
2011-08-24 21:24:39 +00:00
Eelco Dolstra fc8204c0e4 * Always symlink etc/dbus-1 and share/dbus-1 in the system path, not
just when KDE is enabled.

svn path=/nixos/trunk/; revision=23053
2010-08-09 11:42:32 +00:00
David Guibert 6436ed1de4 nixos: kerberos services for the server.
svn path=/nixos/trunk/; revision=22985
2010-08-06 08:49:08 +00:00
Eelco Dolstra 25fd35862a * Add /nix/var/nix/profiles/default and config.system.path to the list
of DBus configuration directories.  Thus packages with DBus
  configuration files installed in the default profile will be found
  automatically.  (It would be nice to include $HOME/.nix-profile in
  the session bus search path, but I don't think that's possible.)

svn path=/nixos/trunk/; revision=22737
2010-07-26 14:10:04 +00:00
Eelco Dolstra 44656be396 * dbus-daemon: use /etc/dbus-1/system.conf (i.e. ‘--system’) rather than
${configDir}/system.conf.  This is necessary to enable dbus to
  reload its configuration on SIGHUP after a nixos-rebuild.  (The
  daemon cannot be restarted because then console-kit-daemon loses its
  state.)
* Generate a proper /etc/dbus-1/session.conf.

svn path=/nixos/trunk/; revision=22572
2010-07-13 09:22:52 +00:00
Lluís Batlle i Rossell 3f6ca96967 Adding an option to disable nscd.
svn path=/nixos/trunk/; revision=19004
2009-12-16 20:51:25 +00:00
Lluís Batlle i Rossell 4e8270f695 Upstart considers that syslog is ready (runs openlog())
after the connection to dbus worked.
So I set dbus depend also on syslogd.

svn path=/nixos/trunk/; revision=19002
2009-12-16 19:45:11 +00:00
Eelco Dolstra 7aecd0ca53 * hal: depend on both dbus and acpid (if enabled).
* dbus: don't signal Upstart, since that seems to make it forget about
  pending events or something.  In any case starting dbus after acpid
  was running wouldn't trigger hal to be started (but the other way
  around did work).

svn path=/nixos/branches/upstart-0.6/; revision=18251
2009-11-07 12:01:12 +00:00
Eelco Dolstra 83a9bf9a6a * Change all the startOn / stopOn attributes to the Upstart 0.6 syntax
(e.g., startOn = "started foo" instead of startOn = "foo").

svn path=/nixos/branches/upstart-0.6/; revision=18230
2009-11-06 22:19:17 +00:00
Eelco Dolstra b9bfe7ed43 * Connect Upstart to the system bus.
svn path=/nixos/branches/upstart-0.6/; revision=18213
2009-11-06 15:59:23 +00:00
Eelco Dolstra 903e92bde6 * Use Upstart's "export fork" feature to properly detect when a daemon
is "ready".  This prevents ugly race conditions, e.g. HAL failing to
  start because dbus hasn't finished starting yet.
* Support post-start scripts.  These are executed after the job's main
  process has started but before the job's "started" event is
  emitted.  For instance, the udev job uses this to perform "udevadm
  trigger / settle" to create all devices.  Previously this had to be
  done in the pre-start script, so the daemon had to started in the
  pre-start script as well.

svn path=/nixos/branches/upstart-0.6/; revision=18211
2009-11-06 15:23:16 +00:00
Eelco Dolstra 5d240b99d5 * Work around a bug in HAL (it fails to start if $PATH is too long,
since it uses a 512-byte buffer somewhere).

svn path=/nixos/branches/upstart-0.6/; revision=18198
2009-11-06 11:31:57 +00:00
Eelco Dolstra ad17a6dce3 * Changes related to the xorg-7.5 merge.
svn path=/nixos/trunk/; revision=18126
2009-11-04 22:44:40 +00:00
Eelco Dolstra eba8f94069 * jobAttrs -> jobs.
svn path=/nixos/trunk/; revision=17769
2009-10-12 18:09:34 +00:00
Eelco Dolstra d982f23f20 * Convert the remaining jobs to jobAttrs style.
svn path=/nixos/trunk/; revision=17764
2009-10-12 17:27:57 +00:00
Eelco Dolstra 9943e0762e * Update some more modules.
svn path=/nixos/trunk/; revision=17763
2009-10-12 17:09:38 +00:00
Eelco Dolstra a83e308856 * Clean up ConsoleKit.
svn path=/nixos/trunk/; revision=17434
2009-09-25 23:18:52 +00:00
Eelco Dolstra 530c96761a * Start dbus after udev. Otherwise ConsoleKit may or may not
recognise X logins as active sessions (i.e. ck-list-sessions will
  show "active = FALSE", and the user doesn't get ownership of
  devices).  I guess console-kit-daemon (which is started by dbus)
  needs some device in /dev to exist.

svn path=/nixos/trunk/; revision=17428
2009-09-25 20:41:15 +00:00