Commit Graph

117 Commits

Author SHA1 Message Date
Nathan Zadoks
1904ef7f09 systemd: enable upstream systemd-binfmt.service
Since we don't restart sysinit.service in switch-to-configuration, this
additionally overrides systemd-binfmt.service to depend on
proc-sys-fs-binfmt_misc.automount, which is normally provided by
sysinit.service.
2016-03-02 21:00:47 +01:00
Nikolay Amiantov
148396c022 systemd service: add *.busname upstream units 2016-01-18 19:42:25 +03:00
Thomas Strobel
a04a7272aa Add missing 'type', 'defaultText' and 'literalExample' in module definitions
- add missing types in module definitions
- add missing 'defaultText' in module definitions
- wrap example with 'literalExample' where necessary in module definitions
2016-01-17 19:41:23 +01:00
Evgeny Egorochkin
01130e502a systemd: backslashes are no longer allowed in script names 2016-01-10 11:31:38 +02:00
Gabriel Ebner
f4c01fc004 systemd: enable timedated, hostnamed, localed. 2015-12-07 20:25:53 +01:00
Jaka Hudoklin
b9291616a6 systemd module: Add OnFailure to systemd common unit options 2015-11-16 15:12:28 +01:00
Eelco Dolstra
81f6c62004 Merge remote-tracking branch 'origin/master' into systemd-219 2015-10-30 15:47:37 +01:00
Eelco Dolstra
5f077e2296 Factor out option renaming
Option aliases/deprecations can now be declared in any NixOS module,
not just in nixos/modules/rename.nix. This is more modular (since it
allows for example grub-related aliases to be declared in the grub
module), and allows aliases outside of NixOS (e.g. in NixOps modules).

The syntax is a bit funky. Ideally we'd have something like:

  options = {
    foo.bar.newOption = mkOption { ... };
    foo.bar.oldOption = mkAliasOption [ "foo" "bar" "newOption" ];
  };

but that's not possible because options cannot define values in
*other* options - you need to have a "config" for that. So instead we
have functions that return a *module*: mkRemovedOptionModule,
mkRenamedOptionModule and mkAliasOptionModule. These can be used via
"imports", e.g.

  imports = [
    (mkAliasOptionModule [ "foo" "bar" "oldOption" ] [ "foo" "bar" "newOption" ]);
  ];

As an added bonus, deprecation warnings now show the file name of the
offending module.

Fixes #10385.
2015-10-14 18:18:47 +02:00
Eelco Dolstra
73f0d83858 systemd: Update to 227 2015-10-07 22:01:21 +02:00
Eelco Dolstra
b23038dd80 Merge remote-tracking branch 'origin/master' into systemd-219 2015-10-01 14:17:46 +02:00
Thomas Strobel
05c46bfc05 systemd module: add option to specify generators
Adding the configuration option 'systemd.generators' to
specify systemd system-generators. The option allows to
either add new system-generators to systemd, or to over-
ride or disable the system-generators provided by systemd.

Internally, the configuration option 'systemd.generators'
maps onto the 'environment.etc' configuration option.
Having a convenience wrapper around 'environment.etc' helps
to group the systemd system-generator configuration more
easily with other 'systemd...' configurations.
2015-09-29 11:53:25 +02:00
Eelco Dolstra
916793cf13 Merge branch 'master' into systemd-219
Conflicts:
	nixos/modules/system/boot/systemd.nix
	pkgs/applications/networking/p2p/transmission/default.nix
	pkgs/development/libraries/libseccomp/default.nix
	pkgs/os-specific/linux/systemd/default.nix
	pkgs/top-level/all-packages.nix
2015-09-07 21:28:33 +02:00
Eelco Dolstra
6ab7e0de29 Create /var/log/journal
Fixes #9614.
2015-09-03 11:35:47 +02:00
Anders Papitto
57f7798b51 also generate startAt timers for systemd user units 2015-08-20 23:46:08 -07:00
Tuomas Tynkkynen
5d02c02a9b systemd: Use upstream tmpfiles.d rules
This fixes a failing assert in systemd-timesyncd (issue #5913) as it
expects the directory /run/systemd/netif/links/ to exist, and nothing in
NixOS currently creates it.

Also we get a net reduction in our code as rules for /run/utmp and
/var/log/journal are also provided by the same upstream file.

(cherry picked from commit a278a9224a)
2015-07-22 12:27:05 +02:00
Eelco Dolstra
925e1f91c5 Set up /etc/machine-id before starting systemd
Otherwise, systemd will try to populate /etc, which we don't want.

(cherry picked from commit c8501a4218)
2015-07-22 12:24:32 +02:00
Eelco Dolstra
6bd4e0b8cd Create systemd-{network,resolve} user/group unconditionally
This shuts up this error from dbus:

May 11 13:52:16 machine dbus-daemon[259]: Unknown username "systemd-network" in message bus configuration file
May 11 13:52:16 machine dbus-daemon[259]: Unknown username "systemd-resolve" in message bus configuration file

which happens because the D-Bus config for networkd/resolved is
enabled unconditionally, and we don't have an easy way to turn it off.

(cherry picked from commit f19b58fb6a)
2015-07-22 12:23:45 +02:00
Eelco Dolstra
65700b435c Use ConditionVirtualization to disable some services in containers
(cherry picked from commit c52a983806)
2015-07-22 12:23:40 +02:00
Eelco Dolstra
bc1773fe16 Merge remote-tracking branch 'origin/staging' into systemd-219
Conflicts:
	pkgs/os-specific/linux/kernel/linux-3.4.nix
	pkgs/os-specific/linux/systemd/default.nix
2015-07-20 22:57:23 +02:00
Eelco Dolstra
19ffa212af types.uniq types.int -> types.int
types.int already implies uniqueness.
2015-06-15 18:11:32 +02:00
Tuomas Tynkkynen
a278a9224a systemd: Use upstream tmpfiles.d rules
This fixes a failing assert in systemd-timesyncd (issue #5913) as it
expects the directory /run/systemd/netif/links/ to exist, and nothing in
NixOS currently creates it.

Also we get a net reduction in our code as rules for /run/utmp and
/var/log/journal are also provided by the same upstream file.
2015-06-03 10:49:01 +02:00
Eelco Dolstra
588b92a7d2 systemd: Update to 220 2015-05-22 15:34:08 +02:00
Eelco Dolstra
c8501a4218 Set up /etc/machine-id before starting systemd
Otherwise, systemd will try to populate /etc, which we don't want.
2015-05-18 11:35:00 +02:00
Eelco Dolstra
76055df52d Allow systemd-journald to be restarted
With systemd 219, this is fine because systemd will cause the new
journald to re-use the file descriptors of the old one. So existing
connections to the journal are unaffected.
2015-05-11 18:18:36 +02:00
Eelco Dolstra
f19b58fb6a Create systemd-{network,resolve} user/group unconditionally
This shuts up this error from dbus:

May 11 13:52:16 machine dbus-daemon[259]: Unknown username "systemd-network" in message bus configuration file
May 11 13:52:16 machine dbus-daemon[259]: Unknown username "systemd-resolve" in message bus configuration file

which happens because the D-Bus config for networkd/resolved is
enabled unconditionally, and we don't have an easy way to turn it off.
2015-05-11 18:18:36 +02:00
Eelco Dolstra
c52a983806 Use ConditionVirtualization to disable some services in containers 2015-05-11 18:18:35 +02:00
Eelco Dolstra
fe952a42a7 systemd: Update to 219 2015-05-11 18:18:35 +02:00
Eelco Dolstra
492471b453 Apply some overrides to upstream systemd units
This removes the need for the following patches:

9a6cade993
9f7e832c90
2015-05-11 12:43:35 +02:00
aszlig
4cdb4a4fef
networkd: Fix evaluation of systemd.network units.
During the refactor of the networkd stuff in f8dbe5f, a lot of the
options are now needed by systemd.nix as well as networkd.nix but
weren't moved by that commit as well.

For now, this fixes all networkd VM tests except for the macvlan one and
thus it should fix #7505 for at least DHCP-based configuration.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-04-30 06:49:10 +02:00
Eelco Dolstra
56f66dad97 Fix #7476 2015-04-20 11:32:29 +02:00
Eelco Dolstra
c87977e97d Don't include networkd units unless enabled
Otherwise, the enabled -> disabled transition won't be handled
correctly (switch-to-configuration currently assumes that if a unit is
running and exists, it should be restarted).
2015-04-19 22:06:45 +02:00
Eelco Dolstra
f8dbe5f376 systemd: Move networkd into separate modules
The systemd module was getting rather bloated.
2015-04-19 22:06:45 +02:00
Nicolas B. Pierron
6de931a0f8 Merge rename.nix changes. 2015-04-03 23:12:12 +02:00
Guillaume Maudoux
6ca7fb8f73 nixos/systemd: Also escape ':' characters 2015-03-25 22:11:35 +01:00
Shea Levy
e4a06f35b1 nixos: Don't evaluate twice to get the value of config.nixpkgs 2015-03-12 23:42:57 +01:00
Jaka Hudoklin
769fb8a141 Merge pull request #5486 from matejc/fixgatewayd
systemd-journal-gatewayd: add systemd-journal group
2015-02-07 14:52:31 +00:00
Eelco Dolstra
e62cb5585d Merge pull request #5507 from DamienCassou/systemd-user-timers
Add systemd.user.timers
2014-12-30 15:40:43 +01:00
Damien Cassou
dcc93abe74 Add systemd.user.timers 2014-12-30 05:46:36 +01:00
Tobias Geerinckx-Rice
c64257b8e5 Fix user-facing typos (mainly in descriptions) 2014-12-30 03:31:03 +01:00
Matej Cotman
9eb24c72ff systemd: fix permissions on /var/log/journal 2014-12-28 22:37:50 +01:00
Jaka Hudoklin
8bb6fdc4f9 nixos/systemd: ignore null environment options 2014-12-07 21:44:20 +01:00
William A. Kennington III
8a94c06595 nixos: Add network-pre.target and adjust firewall start ordering 2014-12-01 17:19:44 -08:00
William A. Kennington III
2b06a92c2a nixos/nfs: Fix dependency ordering 2014-12-01 17:19:44 -08:00
William A. Kennington III
1c04e69bce nixos/networking: Fix more harmless errors 2014-12-01 01:18:32 -08:00
William A. Kennington III
7ecb084b77 nixos/networking: More fixes 2014-11-29 22:35:03 -08:00
William A. Kennington III
1860ee27b0 nixos/networking: Fixes 2014-11-26 16:29:24 -08:00
William A. Kennington III
0626c1ecf0 nixos/systemd: ip-up and network-online targets should come after networkd-wait-online 2014-11-26 11:22:02 -08:00
William A. Kennington III
59f512ef7d nixos/network-interfaces: Provide a networkd implementation 2014-11-26 11:22:02 -08:00
William A. Kennington III
a332c4eac5 systemd: Enable more network services 2014-11-26 11:22:02 -08:00
William A. Kennington III
08e74f2791 systemd: Add ability to define networks 2014-11-26 11:22:02 -08:00