diff --git a/doc/manual/running.xml b/doc/manual/running.xml
index f9feadbc086e..ea4028b6e9b5 100644
--- a/doc/manual/running.xml
+++ b/doc/manual/running.xml
@@ -212,7 +212,7 @@ would get 1/1001 of the cgroup’s CPU time.) You can limit a service’s
CPU share in configuration.nix:
-boot.systemd.services.httpd.serviceConfig.CPUShares = 512;
+systemd.services.httpd.serviceConfig.CPUShares = 512;
By default, every cgroup has 1024 CPU shares, so this will halve the
@@ -227,8 +227,8 @@ available memory. Per-cgroup memory limits can be specified in
and 640 MiB of RAM (including swap):
-boot.systemd.services.httpd.serviceConfig.MemoryLimit = "512M";
-boot.systemd.services.httpd.serviceConfig.ControlGroupAttribute = [ "memory.memsw.limit_in_bytes 640M" ];
+systemd.services.httpd.serviceConfig.MemoryLimit = "512M";
+systemd.services.httpd.serviceConfig.ControlGroupAttribute = [ "memory.memsw.limit_in_bytes 640M" ];
diff --git a/modules/config/networking.nix b/modules/config/networking.nix
index e9d04c49904d..6908996db6c9 100644
--- a/modules/config/networking.nix
+++ b/modules/config/networking.nix
@@ -87,7 +87,7 @@ in
}
];
- boot.systemd.units."ip-up.target".text =
+ systemd.units."ip-up.target".text =
''
[Unit]
Description=Services Requiring IP Connectivity
diff --git a/modules/config/power-management.nix b/modules/config/power-management.nix
index c48451bd5f5c..4da6cebcb941 100644
--- a/modules/config/power-management.nix
+++ b/modules/config/power-management.nix
@@ -73,7 +73,7 @@ in
powerManagement.scsiLinkPolicy = mkDefault "min_power";
# Service executed before suspending/hibernating.
- boot.systemd.services."pre-sleep" =
+ systemd.services."pre-sleep" =
{ description = "Pre-Sleep Actions";
wantedBy = [ "sleep.target" ];
before = [ "sleep.target" ];
@@ -87,7 +87,7 @@ in
# Service executed before suspending/hibernating. There doesn't
# seem to be a good way to hook in a service to be executed after
# both suspend *and* hibernate, so have a separate one for each.
- boot.systemd.services."post-suspend" =
+ systemd.services."post-suspend" =
{ description = "Post-Suspend Actions";
wantedBy = [ "suspend.target" ];
after = [ "systemd-suspend.service" ];
@@ -99,7 +99,7 @@ in
serviceConfig.Type = "oneshot";
};
- boot.systemd.services."post-hibernate" =
+ systemd.services."post-hibernate" =
{ description = "Post-Hibernate Actions";
wantedBy = [ "hibernate.target" ];
after = [ "systemd-hibernate.service" ];
diff --git a/modules/config/swap.nix b/modules/config/swap.nix
index 8a2f58d7dcd2..222c18d3e629 100644
--- a/modules/config/swap.nix
+++ b/modules/config/swap.nix
@@ -82,7 +82,7 @@ with utils;
# Create missing swapfiles.
# FIXME: support changing the size of existing swapfiles.
- boot.systemd.services =
+ systemd.services =
let
createSwapDevice = sw:
diff --git a/modules/profiles/headless.nix b/modules/profiles/headless.nix
index 593bd925b006..0a2bfa80c47c 100644
--- a/modules/profiles/headless.nix
+++ b/modules/profiles/headless.nix
@@ -12,8 +12,8 @@ with pkgs.lib;
services.ttyBackgrounds.enable = false;
# Don't start a tty on the serial consoles.
- boot.systemd.services."serial-getty@ttyS0".enable = false;
- boot.systemd.services."serial-getty@hvc0".enable = false;
+ systemd.services."serial-getty@ttyS0".enable = false;
+ systemd.services."serial-getty@hvc0".enable = false;
# Since we can't manually respond to a panic, just reboot.
boot.kernelParams = [ "panic=1" "boot.panic_on_fail" ];
diff --git a/modules/rename.nix b/modules/rename.nix
index 43566bab22f9..534137d4e091 100644
--- a/modules/rename.nix
+++ b/modules/rename.nix
@@ -71,6 +71,11 @@ in zipModules ([]
++ rename obsolete "networking.enableWLAN" "networking.wireless.enable"
++ rename obsolete "networking.enableRT73Firmware" "networking.enableRalinkFirmware"
+# FIXME: Remove these eventually.
+++ rename obsolete "boot.systemd.sockets" "systemd.sockets"
+++ rename obsolete "boot.systemd.targets" "systemd.targets"
+++ rename obsolete "boot.systemd.services" "systemd.services"
+
# Old Grub-related options.
++ rename obsolete "boot.copyKernels" "boot.loader.grub.copyKernels"
++ rename obsolete "boot.extraGrubEntries" "boot.loader.grub.extraEntries"
diff --git a/modules/security/rngd.nix b/modules/security/rngd.nix
index 519fb62133cd..dd251fe69d31 100644
--- a/modules/security/rngd.nix
+++ b/modules/security/rngd.nix
@@ -22,7 +22,7 @@ with pkgs.lib;
KERNEL=="tmp0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="rngd.service"
'';
- boot.systemd.services.rngd = {
+ systemd.services.rngd = {
bindsTo = [ "dev-random.device" ];
after = [ "dev-random.device" ];
diff --git a/modules/services/audio/alsa.nix b/modules/services/audio/alsa.nix
index 92d0cdd26f32..ead53c3dc3a0 100644
--- a/modules/services/audio/alsa.nix
+++ b/modules/services/audio/alsa.nix
@@ -50,7 +50,7 @@ in
boot.kernelModules = optional config.sound.enableOSSEmulation "snd_pcm_oss";
- boot.systemd.services."alsa-store" =
+ systemd.services."alsa-store" =
{ description = "Store Sound Card State";
wantedBy = [ "shutdown.target" ];
before = [ "shutdown.target" ];
diff --git a/modules/services/databases/mongodb.nix b/modules/services/databases/mongodb.nix
index 9e9e1c7dd8c9..887f1f0529f1 100644
--- a/modules/services/databases/mongodb.nix
+++ b/modules/services/databases/mongodb.nix
@@ -102,7 +102,7 @@ in
environment.systemPackages = [ mongodb ];
- boot.systemd.services.mongodb =
+ systemd.services.mongodb =
{ description = "MongoDB server";
wantedBy = [ "multi-user.target" ];
diff --git a/modules/services/databases/mysql.nix b/modules/services/databases/mysql.nix
index ef29d563c72a..7bf7a77aa85d 100644
--- a/modules/services/databases/mysql.nix
+++ b/modules/services/databases/mysql.nix
@@ -141,7 +141,7 @@ in
environment.systemPackages = [mysql];
- boot.systemd.services.mysql =
+ systemd.services.mysql =
{ description = "MySQL Server";
wantedBy = [ "multi-user.target" ];
diff --git a/modules/services/databases/mysql55.nix b/modules/services/databases/mysql55.nix
index 51fe37b76846..37cab395677e 100644
--- a/modules/services/databases/mysql55.nix
+++ b/modules/services/databases/mysql55.nix
@@ -134,7 +134,7 @@ in
environment.systemPackages = [mysql];
- boot.systemd.services.mysql =
+ systemd.services.mysql =
{ description = "MySQL Server";
wantedBy = [ "multi-user.target" ];
diff --git a/modules/services/databases/postgresql.nix b/modules/services/databases/postgresql.nix
index c178a84b1b85..a33fdaab423e 100644
--- a/modules/services/databases/postgresql.nix
+++ b/modules/services/databases/postgresql.nix
@@ -155,7 +155,7 @@ in
environment.systemPackages = [postgresql];
- boot.systemd.services.postgresql =
+ systemd.services.postgresql =
{ description = "PostgreSQL Server";
wantedBy = [ "multi-user.target" ];
diff --git a/modules/services/hardware/upower.nix b/modules/services/hardware/upower.nix
index 58f2610ce067..54f5d03de391 100644
--- a/modules/services/hardware/upower.nix
+++ b/modules/services/hardware/upower.nix
@@ -35,7 +35,7 @@ with pkgs.lib;
services.udev.packages = [ pkgs.upower ];
- boot.systemd.services.upower =
+ systemd.services.upower =
{ description = "Power Management Daemon";
path = [ pkgs.glib ]; # needed for gdbus
serviceConfig =
diff --git a/modules/services/logging/logstash.nix b/modules/services/logging/logstash.nix
index bc44620d6442..b535a942a9e8 100644
--- a/modules/services/logging/logstash.nix
+++ b/modules/services/logging/logstash.nix
@@ -136,7 +136,7 @@ in
mkNameValuePairs = mergeConfigs;
};
} ( mkIf cfg.enable {
- boot.systemd.services.logstash = with pkgs; {
+ systemd.services.logstash = with pkgs; {
description = "Logstash daemon";
wantedBy = [ "multi-user.target" ];
diff --git a/modules/services/logging/syslogd.nix b/modules/services/logging/syslogd.nix
index 8c815ddf25f8..886669606b45 100644
--- a/modules/services/logging/syslogd.nix
+++ b/modules/services/logging/syslogd.nix
@@ -105,7 +105,7 @@ in
services.syslogd.extraParams = optional cfg.enableNetworkInput "-r";
# FIXME: restarting syslog seems to break journal logging.
- boot.systemd.services.syslog =
+ systemd.services.syslog =
{ description = "Syslog Daemon";
requires = [ "syslog.socket" ];
diff --git a/modules/services/misc/nix-daemon.nix b/modules/services/misc/nix-daemon.nix
index eaea8bd653a3..a2ec899a5931 100644
--- a/modules/services/misc/nix-daemon.nix
+++ b/modules/services/misc/nix-daemon.nix
@@ -270,14 +270,14 @@ in
target = "nix.machines";
};
- boot.systemd.sockets."nix-daemon" =
+ systemd.sockets."nix-daemon" =
{ description = "Nix Daemon Socket";
wantedBy = [ "sockets.target" ];
before = [ "multi-user.target" ];
socketConfig.ListenStream = "/nix/var/nix/daemon-socket/socket";
};
- boot.systemd.services."nix-daemon" =
+ systemd.services."nix-daemon" =
{ description = "Nix Daemon";
path = [ nix pkgs.openssl pkgs.utillinux ]
diff --git a/modules/services/misc/nix-gc.nix b/modules/services/misc/nix-gc.nix
index 435326e87fb8..dc9fa85cf667 100644
--- a/modules/services/misc/nix-gc.nix
+++ b/modules/services/misc/nix-gc.nix
@@ -51,7 +51,7 @@ in
services.cron.systemCronJobs = mkIf cfg.automatic (singleton
"${cfg.dates} root ${config.system.build.systemd}/bin/systemctl start nix-gc.service");
- boot.systemd.services."nix-gc" =
+ systemd.services."nix-gc" =
{ description = "Nix Garbage Collector";
path = [ config.environment.nix ];
script = "exec nix-collect-garbage ${cfg.options}";
diff --git a/modules/services/misc/nixos-manual.nix b/modules/services/misc/nixos-manual.nix
index 1a172904c454..108ed2911ce0 100644
--- a/modules/services/misc/nixos-manual.nix
+++ b/modules/services/misc/nixos-manual.nix
@@ -84,7 +84,7 @@ in
boot.extraTTYs = mkIf cfg.showManual ["tty${cfg.ttyNumber}"];
- boot.systemd.services = optionalAttrs cfg.showManual
+ systemd.services = optionalAttrs cfg.showManual
{ "nixos-manual" =
{ description = "NixOS Manual";
wantedBy = [ "multi-user.target" ];
diff --git a/modules/services/misc/rogue.nix b/modules/services/misc/rogue.nix
index 12d61a8ea9fd..c5cc8b4050d7 100644
--- a/modules/services/misc/rogue.nix
+++ b/modules/services/misc/rogue.nix
@@ -40,7 +40,7 @@ in
boot.extraTTYs = [ cfg.tty ];
- boot.systemd.services.rogue =
+ systemd.services.rogue =
{ description = "Rogue dungeon crawling game";
wantedBy = [ "multi-user.target" ];
serviceConfig =
diff --git a/modules/services/monitoring/dd-agent.nix b/modules/services/monitoring/dd-agent.nix
index c0493557d56d..c6ab1ca0a3a0 100644
--- a/modules/services/monitoring/dd-agent.nix
+++ b/modules/services/monitoring/dd-agent.nix
@@ -43,7 +43,7 @@ in {
config = mkIf cfg.enable {
environment.etc = [ { source = datadog-conf; target = "dd-agent/datadog.conf"; } ];
- boot.systemd.services.dd-agent = {
+ systemd.services.dd-agent = {
description = "Datadog agent monitor";
path = [ pkgs.sysstat pkgs.procps ];
diff --git a/modules/services/monitoring/smartd.nix b/modules/services/monitoring/smartd.nix
index 48066856625a..07acab761d08 100644
--- a/modules/services/monitoring/smartd.nix
+++ b/modules/services/monitoring/smartd.nix
@@ -81,7 +81,7 @@ in
config = mkIf cfg.enable {
- boot.systemd.services.smartd = {
+ systemd.services.smartd = {
description = "S.M.A.R.T. Daemon";
environment.TZ = config.time.timeZone;
diff --git a/modules/services/monitoring/zabbix-agent.nix b/modules/services/monitoring/zabbix-agent.nix
index 9758bc8cb485..229236c1bbd4 100644
--- a/modules/services/monitoring/zabbix-agent.nix
+++ b/modules/services/monitoring/zabbix-agent.nix
@@ -73,7 +73,7 @@ in
description = "Zabbix daemon user";
};
- boot.systemd.services."zabbix-agent" =
+ systemd.services."zabbix-agent" =
{ description = "Zabbix Agent";
wantedBy = [ "multi-user.target" ];
diff --git a/modules/services/monitoring/zabbix-server.nix b/modules/services/monitoring/zabbix-server.nix
index 085fb022c1c9..df42071ebba0 100644
--- a/modules/services/monitoring/zabbix-server.nix
+++ b/modules/services/monitoring/zabbix-server.nix
@@ -73,7 +73,7 @@ in
description = "Zabbix daemon user";
};
- boot.systemd.services."zabbix-server" =
+ systemd.services."zabbix-server" =
{ description = "Zabbix Server";
wantedBy = [ "multi-user.target" ];
diff --git a/modules/services/network-filesystems/nfsd.nix b/modules/services/network-filesystems/nfsd.nix
index 995e9bba6030..ab8e77e2bad4 100644
--- a/modules/services/network-filesystems/nfsd.nix
+++ b/modules/services/network-filesystems/nfsd.nix
@@ -80,7 +80,7 @@ in
boot.kernelModules = [ "nfsd" ];
- boot.systemd.services.nfsd =
+ systemd.services.nfsd =
{ description = "NFS Server";
wantedBy = [ "multi-user.target" ];
@@ -108,7 +108,7 @@ in
serviceConfig.RemainAfterExit = true;
};
- boot.systemd.services.mountd =
+ systemd.services.mountd =
{ description = "NFSv3 Mount Daemon";
requires = [ "rpcbind.service" ];
diff --git a/modules/services/network-filesystems/samba.nix b/modules/services/network-filesystems/samba.nix
index aa75c4322a00..c4157c647c63 100644
--- a/modules/services/network-filesystems/samba.nix
+++ b/modules/services/network-filesystems/samba.nix
@@ -200,7 +200,7 @@ in
};
- boot.systemd = {
+ systemd = {
targets.samba = {
description = "Samba server";
requires = [ "samba-setup.service" ];
diff --git a/modules/services/networking/dhcpcd.nix b/modules/services/networking/dhcpcd.nix
index 739ba95d5e34..533b719a6675 100644
--- a/modules/services/networking/dhcpcd.nix
+++ b/modules/services/networking/dhcpcd.nix
@@ -92,7 +92,7 @@ in
config = mkIf config.networking.useDHCP {
- boot.systemd.services.dhcpcd =
+ systemd.services.dhcpcd =
{ description = "DHCP Client";
wantedBy = [ "network.target" ];
diff --git a/modules/services/networking/gogoclient.nix b/modules/services/networking/gogoclient.nix
index 7d742df97b0f..07c35e3cb3d6 100644
--- a/modules/services/networking/gogoclient.nix
+++ b/modules/services/networking/gogoclient.nix
@@ -58,7 +58,7 @@ in
networking.enableIPv6 = true;
- boot.systemd.services.gogoclient = {
+ systemd.services.gogoclient = {
description = "ipv6 tunnel";
after = [ "network.target" ];
diff --git a/modules/services/networking/openvpn.nix b/modules/services/networking/openvpn.nix
index 12808e2ee271..4ea6fa135b0f 100644
--- a/modules/services/networking/openvpn.nix
+++ b/modules/services/networking/openvpn.nix
@@ -11,7 +11,7 @@ let
makeOpenVPNJob = cfg: name:
let
- path = (getAttr "openvpn-${name}" config.boot.systemd.services).path;
+ path = (getAttr "openvpn-${name}" config.systemd.services).path;
upScript = ''
#! /bin/sh
diff --git a/modules/services/networking/rpcbind.nix b/modules/services/networking/rpcbind.nix
index f82803e75194..7180b2cfa14f 100644
--- a/modules/services/networking/rpcbind.nix
+++ b/modules/services/networking/rpcbind.nix
@@ -65,7 +65,7 @@ in
environment.etc = [ netconfigFile ];
- boot.systemd.services.rpcbind =
+ systemd.services.rpcbind =
{ description = "ONC RPC Directory Service";
wantedBy = [ "multi-user.target" ];
diff --git a/modules/services/networking/ssh/sshd.nix b/modules/services/networking/ssh/sshd.nix
index 8f898ce06a18..e9df8dd3cf6b 100644
--- a/modules/services/networking/ssh/sshd.nix
+++ b/modules/services/networking/ssh/sshd.nix
@@ -262,7 +262,7 @@ in
}
];
- boot.systemd.services.sshd =
+ systemd.services.sshd =
{ description = "SSH Daemon";
wantedBy = [ "multi-user.target" ];
diff --git a/modules/services/system/dbus.nix b/modules/services/system/dbus.nix
index a6544368ea0b..4a9d9a77b575 100644
--- a/modules/services/system/dbus.nix
+++ b/modules/services/system/dbus.nix
@@ -118,7 +118,7 @@ in
# FIXME: these are copied verbatim from the dbus source tree. We
# should install and use the originals.
- boot.systemd.units."dbus.socket".text =
+ systemd.units."dbus.socket".text =
''
[Unit]
Description=D-Bus System Message Bus Socket
@@ -127,7 +127,7 @@ in
ListenStream=/var/run/dbus/system_bus_socket
'';
- boot.systemd.units."dbus.service".text =
+ systemd.units."dbus.service".text =
''
[Unit]
Description=D-Bus System Message Bus
diff --git a/modules/services/system/nscd.nix b/modules/services/system/nscd.nix
index 1843368ba27d..22f507f39d74 100644
--- a/modules/services/system/nscd.nix
+++ b/modules/services/system/nscd.nix
@@ -38,7 +38,7 @@ in
description = "Name service cache daemon user";
};
- boot.systemd.services.nscd =
+ systemd.services.nscd =
{ description = "Name Service Cache Daemon";
wantedBy = [ "nss-lookup.target" "nss-user-lookup.target" ];
diff --git a/modules/services/ttys/agetty.nix b/modules/services/ttys/agetty.nix
index 444d04564a97..f269de6fc2a0 100644
--- a/modules/services/ttys/agetty.nix
+++ b/modules/services/ttys/agetty.nix
@@ -39,7 +39,7 @@ with pkgs.lib;
# which some small modifications, which is annoying.
# Generate a separate job for each tty.
- boot.systemd.units."getty@.service".text =
+ systemd.units."getty@.service".text =
''
[Unit]
Description=Getty on %I
@@ -76,7 +76,7 @@ with pkgs.lib;
X-RestartIfChanged=false
'';
- boot.systemd.units."serial-getty@.service".text =
+ systemd.units."serial-getty@.service".text =
''
[Unit]
Description=Serial Getty on %I
diff --git a/modules/services/web-servers/apache-httpd/default.nix b/modules/services/web-servers/apache-httpd/default.nix
index 17a8c8216cad..35afacefa164 100644
--- a/modules/services/web-servers/apache-httpd/default.nix
+++ b/modules/services/web-servers/apache-httpd/default.nix
@@ -601,7 +601,7 @@ in
date.timezone = "${config.time.timeZone}"
'';
- boot.systemd.services.httpd =
+ systemd.services.httpd =
{ description = "Apache HTTPD";
wantedBy = [ "multi-user.target" ];
diff --git a/modules/services/x11/xserver.nix b/modules/services/x11/xserver.nix
index 599f8be226db..2e6158bafa11 100644
--- a/modules/services/x11/xserver.nix
+++ b/modules/services/x11/xserver.nix
@@ -386,9 +386,9 @@ in
environment.pathsToLink =
[ "/etc/xdg" "/share/xdg" "/share/applications" "/share/icons" "/share/pixmaps" ];
- boot.systemd.defaultUnit = mkIf cfg.autorun "graphical.target";
+ systemd.defaultUnit = mkIf cfg.autorun "graphical.target";
- boot.systemd.services."display-manager" =
+ systemd.services."display-manager" =
{ description = "X11 Server";
after = [ "systemd-udev-settle.service" "local-fs.target" ];
diff --git a/modules/system/boot/kernel.nix b/modules/system/boot/kernel.nix
index 6cf9311e471e..4776f4451f05 100644
--- a/modules/system/boot/kernel.nix
+++ b/modules/system/boot/kernel.nix
@@ -213,7 +213,7 @@ in
# just so we can set a restart trigger. Also make
# multi-user.target pull it in so that it gets started if it
# failed earlier.
- boot.systemd.services."systemd-modules-load" =
+ systemd.services."systemd-modules-load" =
{ description = "Load Kernel Modules";
wantedBy = [ "sysinit.target" "multi-user.target" ];
before = [ "sysinit.target" "shutdown.target" ];
diff --git a/modules/system/boot/shutdown.nix b/modules/system/boot/shutdown.nix
index 3fb9545b33fb..23ddf6d02024 100644
--- a/modules/system/boot/shutdown.nix
+++ b/modules/system/boot/shutdown.nix
@@ -6,7 +6,7 @@ with pkgs.lib;
# This unit saves the value of the system clock to the hardware
# clock on shutdown.
- boot.systemd.units."save-hwclock.service" =
+ systemd.units."save-hwclock.service" =
{ wantedBy = [ "shutdown.target" ];
text =
diff --git a/modules/system/boot/systemd.nix b/modules/system/boot/systemd.nix
index 83911d179fde..80957cd11930 100644
--- a/modules/system/boot/systemd.nix
+++ b/modules/system/boot/systemd.nix
@@ -6,7 +6,7 @@ with import ./systemd-unit-options.nix { inherit config pkgs; };
let
- cfg = config.boot.systemd;
+ cfg = config.systemd;
systemd = pkgs.systemd;
@@ -340,7 +340,7 @@ in
options = {
- boot.systemd.units = mkOption {
+ systemd.units = mkOption {
description = "Definition of systemd units.";
default = {};
type = types.attrsOf types.optionSet;
@@ -367,34 +367,34 @@ in
};
};
- boot.systemd.packages = mkOption {
+ systemd.packages = mkOption {
default = [];
type = types.listOf types.package;
description = "Packages providing systemd units.";
};
- boot.systemd.targets = mkOption {
+ systemd.targets = mkOption {
default = {};
type = types.attrsOf types.optionSet;
options = [ unitOptions unitConfig ];
description = "Definition of systemd target units.";
};
- boot.systemd.services = mkOption {
+ systemd.services = mkOption {
default = {};
type = types.attrsOf types.optionSet;
options = [ serviceOptions unitConfig serviceConfig ];
description = "Definition of systemd service units.";
};
- boot.systemd.sockets = mkOption {
+ systemd.sockets = mkOption {
default = {};
type = types.attrsOf types.optionSet;
options = [ socketOptions unitConfig ];
description = "Definition of systemd socket units.";
};
- boot.systemd.mounts = mkOption {
+ systemd.mounts = mkOption {
default = [];
type = types.listOf types.optionSet;
options = [ mountOptions unitConfig mountConfig ];
@@ -405,13 +405,13 @@ in
'';
};
- boot.systemd.defaultUnit = mkOption {
+ systemd.defaultUnit = mkOption {
default = "multi-user.target";
type = types.uniq types.string;
description = "Default unit started when the system boots.";
};
- boot.systemd.globalEnvironment = mkOption {
+ systemd.globalEnvironment = mkOption {
type = types.attrs;
default = {};
example = { TZ = "CET"; };
@@ -500,11 +500,11 @@ in
'';
# Target for ‘charon send-keys’ to hook into.
- boot.systemd.targets.keys =
+ systemd.targets.keys =
{ description = "Security Keys";
};
- boot.systemd.units =
+ systemd.units =
mapAttrs' (n: v: nameValuePair "${n}.target" (targetToUnit n v)) cfg.targets
// mapAttrs' (n: v: nameValuePair "${n}.service" (serviceToUnit n v)) cfg.services
// mapAttrs' (n: v: nameValuePair "${n}.socket" (socketToUnit n v)) cfg.sockets
diff --git a/modules/system/upstart/upstart.nix b/modules/system/upstart/upstart.nix
index 44e6e8bb63b5..5d5139b7a57e 100644
--- a/modules/system/upstart/upstart.nix
+++ b/modules/system/upstart/upstart.nix
@@ -277,7 +277,7 @@ in
config = {
- boot.systemd.services =
+ systemd.services =
flip mapAttrs' config.jobs (name: job:
nameValuePair job.name job.unit);
diff --git a/modules/tasks/filesystems.nix b/modules/tasks/filesystems.nix
index 00d711eecd31..8efc96f7fe46 100644
--- a/modules/tasks/filesystems.nix
+++ b/modules/tasks/filesystems.nix
@@ -177,13 +177,13 @@ in
};
# Provide a target that pulls in all filesystems.
- boot.systemd.targets.fs =
+ systemd.targets.fs =
{ description = "All File Systems";
wants = [ "local-fs.target" "remote-fs.target" ];
};
# Emit systemd services to format requested filesystems.
- boot.systemd.services =
+ systemd.services =
let
formatDevice = fs:
diff --git a/modules/tasks/filesystems/nfs.nix b/modules/tasks/filesystems/nfs.nix
index 055733e456a8..3d5e1dd51f50 100644
--- a/modules/tasks/filesystems/nfs.nix
+++ b/modules/tasks/filesystems/nfs.nix
@@ -40,7 +40,7 @@ in
boot.initrd.kernelModules = mkIf inInitrd [ "nfs" ];
- boot.systemd.services.statd =
+ systemd.services.statd =
{ description = "NFSv3 Network Status Monitor";
path = [ pkgs.nfsUtils pkgs.sysvtools pkgs.utillinux ];
@@ -64,7 +64,7 @@ in
serviceConfig.Restart = "always";
};
- boot.systemd.services.idmapd =
+ systemd.services.idmapd =
{ description = "NFSv4 ID Mapping Daemon";
path = [ pkgs.sysvtools pkgs.utillinux ];
diff --git a/modules/tasks/kbd.nix b/modules/tasks/kbd.nix
index 7867b3c19126..b0e222cd05eb 100644
--- a/modules/tasks/kbd.nix
+++ b/modules/tasks/kbd.nix
@@ -74,7 +74,7 @@ in
# shipped with systemd, except that it uses /dev/tty1 instead of
# /dev/tty0 to prevent putting the X server in non-raw mode, and
# it has a restart trigger.
- boot.systemd.services."systemd-vconsole-setup" =
+ systemd.services."systemd-vconsole-setup" =
{ description = "Setup Virtual Console";
before = [ "sysinit.target" "shutdown.target" ];
unitConfig =
diff --git a/modules/tasks/network-interfaces.nix b/modules/tasks/network-interfaces.nix
index a002e2b68b2d..e8097e418c8b 100644
--- a/modules/tasks/network-interfaces.nix
+++ b/modules/tasks/network-interfaces.nix
@@ -252,13 +252,13 @@ in
security.setuidPrograms = [ "ping" "ping6" ];
- boot.systemd.targets."network-interfaces" =
+ systemd.targets."network-interfaces" =
{ description = "All Network Interfaces";
wantedBy = [ "network.target" ];
unitConfig.X-StopOnReconfiguration = true;
};
- boot.systemd.services =
+ systemd.services =
let
networkSetup =
diff --git a/modules/testing/test-instrumentation.nix b/modules/testing/test-instrumentation.nix
index 108dcb0ab6db..9c36ac2bbdd4 100644
--- a/modules/testing/test-instrumentation.nix
+++ b/modules/testing/test-instrumentation.nix
@@ -11,7 +11,7 @@ let kernel = config.boot.kernelPackages.kernel; in
config = {
- boot.systemd.services.backdoor =
+ systemd.services.backdoor =
{ wantedBy = [ "multi-user.target" ];
requires = [ "dev-hvc0.device" "dev-ttyS0.device" ];
after = [ "dev-hvc0.device" "dev-ttyS0.device" ];
@@ -34,8 +34,8 @@ let kernel = config.boot.kernelPackages.kernel; in
# Prevent agetty from being instantiated on ttyS0, since it
# interferes with the backdoor (writes to ttyS0 will randomly fail
# with EIO). Likewise for hvc0.
- boot.systemd.services."serial-getty@ttyS0".enable = false;
- boot.systemd.services."serial-getty@hvc0".enable = false;
+ systemd.services."serial-getty@ttyS0".enable = false;
+ systemd.services."serial-getty@hvc0".enable = false;
boot.initrd.postDeviceCommands =
''
@@ -77,7 +77,7 @@ let kernel = config.boot.kernelPackages.kernel; in
networking.defaultGateway = mkOverride 150 "";
networking.nameservers = mkOverride 150 [ ];
- boot.systemd.globalEnvironment.GCOV_PREFIX = "/tmp/xchg/coverage-data";
+ systemd.globalEnvironment.GCOV_PREFIX = "/tmp/xchg/coverage-data";
system.requiredKernelConfig = with config.lib.kernelConfig; [
(isYes "SERIAL_8250_CONSOLE")
diff --git a/modules/virtualisation/ec2-data.nix b/modules/virtualisation/ec2-data.nix
index 33b8c1e516dc..42c50d857e42 100644
--- a/modules/virtualisation/ec2-data.nix
+++ b/modules/virtualisation/ec2-data.nix
@@ -19,7 +19,7 @@ in
{
require = [options];
- boot.systemd.services."fetch-ec2-data" =
+ systemd.services."fetch-ec2-data" =
{ description = "Fetch EC2 Data";
wantedBy = [ "multi-user.target" ];
@@ -78,7 +78,7 @@ in
serviceConfig.RemainAfterExit = true;
};
- boot.systemd.services."print-host-key" =
+ systemd.services."print-host-key" =
{ description = "Print SSH Host Key";
wantedBy = [ "multi-user.target" ];
after = [ "sshd.service" ];
diff --git a/modules/virtualisation/libvirtd.nix b/modules/virtualisation/libvirtd.nix
index 89c4512095db..757a20f61648 100644
--- a/modules/virtualisation/libvirtd.nix
+++ b/modules/virtualisation/libvirtd.nix
@@ -49,7 +49,7 @@ in
boot.kernelModules = [ "tun" ];
- boot.systemd.services.libvirtd =
+ systemd.services.libvirtd =
{ description = "Libvirt Virtual Machine Management Daemon";
wantedBy = [ "multi-user.target" ];