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.
This commit is contained in:
Eelco Dolstra 2013-01-16 12:33:18 +01:00
parent 61f1df279f
commit ae4e94d9ac
46 changed files with 77 additions and 72 deletions

View File

@ -212,7 +212,7 @@ would get 1/1001 of the cgroups CPU time.) You can limit a services
CPU share in <filename>configuration.nix</filename>: CPU share in <filename>configuration.nix</filename>:
<programlisting> <programlisting>
boot.systemd.services.httpd.serviceConfig.CPUShares = 512; systemd.services.httpd.serviceConfig.CPUShares = 512;
</programlisting> </programlisting>
By default, every cgroup has 1024 CPU shares, so this will halve the 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): and 640 MiB of RAM (including swap):
<programlisting> <programlisting>
boot.systemd.services.httpd.serviceConfig.MemoryLimit = "512M"; systemd.services.httpd.serviceConfig.MemoryLimit = "512M";
boot.systemd.services.httpd.serviceConfig.ControlGroupAttribute = [ "memory.memsw.limit_in_bytes 640M" ]; systemd.services.httpd.serviceConfig.ControlGroupAttribute = [ "memory.memsw.limit_in_bytes 640M" ];
</programlisting> </programlisting>
</para> </para>

View File

@ -87,7 +87,7 @@ in
} }
]; ];
boot.systemd.units."ip-up.target".text = systemd.units."ip-up.target".text =
'' ''
[Unit] [Unit]
Description=Services Requiring IP Connectivity Description=Services Requiring IP Connectivity

View File

@ -73,7 +73,7 @@ in
powerManagement.scsiLinkPolicy = mkDefault "min_power"; powerManagement.scsiLinkPolicy = mkDefault "min_power";
# Service executed before suspending/hibernating. # Service executed before suspending/hibernating.
boot.systemd.services."pre-sleep" = systemd.services."pre-sleep" =
{ description = "Pre-Sleep Actions"; { description = "Pre-Sleep Actions";
wantedBy = [ "sleep.target" ]; wantedBy = [ "sleep.target" ];
before = [ "sleep.target" ]; before = [ "sleep.target" ];
@ -87,7 +87,7 @@ in
# Service executed before suspending/hibernating. There doesn't # Service executed before suspending/hibernating. There doesn't
# seem to be a good way to hook in a service to be executed after # 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. # both suspend *and* hibernate, so have a separate one for each.
boot.systemd.services."post-suspend" = systemd.services."post-suspend" =
{ description = "Post-Suspend Actions"; { description = "Post-Suspend Actions";
wantedBy = [ "suspend.target" ]; wantedBy = [ "suspend.target" ];
after = [ "systemd-suspend.service" ]; after = [ "systemd-suspend.service" ];
@ -99,7 +99,7 @@ in
serviceConfig.Type = "oneshot"; serviceConfig.Type = "oneshot";
}; };
boot.systemd.services."post-hibernate" = systemd.services."post-hibernate" =
{ description = "Post-Hibernate Actions"; { description = "Post-Hibernate Actions";
wantedBy = [ "hibernate.target" ]; wantedBy = [ "hibernate.target" ];
after = [ "systemd-hibernate.service" ]; after = [ "systemd-hibernate.service" ];

View File

@ -82,7 +82,7 @@ with utils;
# Create missing swapfiles. # Create missing swapfiles.
# FIXME: support changing the size of existing swapfiles. # FIXME: support changing the size of existing swapfiles.
boot.systemd.services = systemd.services =
let let
createSwapDevice = sw: createSwapDevice = sw:

View File

@ -12,8 +12,8 @@ with pkgs.lib;
services.ttyBackgrounds.enable = false; services.ttyBackgrounds.enable = false;
# Don't start a tty on the serial consoles. # Don't start a tty on the serial consoles.
boot.systemd.services."serial-getty@ttyS0".enable = false; systemd.services."serial-getty@ttyS0".enable = false;
boot.systemd.services."serial-getty@hvc0".enable = false; systemd.services."serial-getty@hvc0".enable = false;
# Since we can't manually respond to a panic, just reboot. # Since we can't manually respond to a panic, just reboot.
boot.kernelParams = [ "panic=1" "boot.panic_on_fail" ]; boot.kernelParams = [ "panic=1" "boot.panic_on_fail" ];

View File

@ -71,6 +71,11 @@ in zipModules ([]
++ rename obsolete "networking.enableWLAN" "networking.wireless.enable" ++ rename obsolete "networking.enableWLAN" "networking.wireless.enable"
++ rename obsolete "networking.enableRT73Firmware" "networking.enableRalinkFirmware" ++ 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. # Old Grub-related options.
++ rename obsolete "boot.copyKernels" "boot.loader.grub.copyKernels" ++ rename obsolete "boot.copyKernels" "boot.loader.grub.copyKernels"
++ rename obsolete "boot.extraGrubEntries" "boot.loader.grub.extraEntries" ++ rename obsolete "boot.extraGrubEntries" "boot.loader.grub.extraEntries"

View File

@ -22,7 +22,7 @@ with pkgs.lib;
KERNEL=="tmp0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="rngd.service" KERNEL=="tmp0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="rngd.service"
''; '';
boot.systemd.services.rngd = { systemd.services.rngd = {
bindsTo = [ "dev-random.device" ]; bindsTo = [ "dev-random.device" ];
after = [ "dev-random.device" ]; after = [ "dev-random.device" ];

View File

@ -50,7 +50,7 @@ in
boot.kernelModules = optional config.sound.enableOSSEmulation "snd_pcm_oss"; boot.kernelModules = optional config.sound.enableOSSEmulation "snd_pcm_oss";
boot.systemd.services."alsa-store" = systemd.services."alsa-store" =
{ description = "Store Sound Card State"; { description = "Store Sound Card State";
wantedBy = [ "shutdown.target" ]; wantedBy = [ "shutdown.target" ];
before = [ "shutdown.target" ]; before = [ "shutdown.target" ];

View File

@ -102,7 +102,7 @@ in
environment.systemPackages = [ mongodb ]; environment.systemPackages = [ mongodb ];
boot.systemd.services.mongodb = systemd.services.mongodb =
{ description = "MongoDB server"; { description = "MongoDB server";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];

View File

@ -141,7 +141,7 @@ in
environment.systemPackages = [mysql]; environment.systemPackages = [mysql];
boot.systemd.services.mysql = systemd.services.mysql =
{ description = "MySQL Server"; { description = "MySQL Server";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];

View File

@ -134,7 +134,7 @@ in
environment.systemPackages = [mysql]; environment.systemPackages = [mysql];
boot.systemd.services.mysql = systemd.services.mysql =
{ description = "MySQL Server"; { description = "MySQL Server";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];

View File

@ -155,7 +155,7 @@ in
environment.systemPackages = [postgresql]; environment.systemPackages = [postgresql];
boot.systemd.services.postgresql = systemd.services.postgresql =
{ description = "PostgreSQL Server"; { description = "PostgreSQL Server";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];

View File

@ -35,7 +35,7 @@ with pkgs.lib;
services.udev.packages = [ pkgs.upower ]; services.udev.packages = [ pkgs.upower ];
boot.systemd.services.upower = systemd.services.upower =
{ description = "Power Management Daemon"; { description = "Power Management Daemon";
path = [ pkgs.glib ]; # needed for gdbus path = [ pkgs.glib ]; # needed for gdbus
serviceConfig = serviceConfig =

View File

@ -136,7 +136,7 @@ in
mkNameValuePairs = mergeConfigs; mkNameValuePairs = mergeConfigs;
}; };
} ( mkIf cfg.enable { } ( mkIf cfg.enable {
boot.systemd.services.logstash = with pkgs; { systemd.services.logstash = with pkgs; {
description = "Logstash daemon"; description = "Logstash daemon";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];

View File

@ -105,7 +105,7 @@ in
services.syslogd.extraParams = optional cfg.enableNetworkInput "-r"; services.syslogd.extraParams = optional cfg.enableNetworkInput "-r";
# FIXME: restarting syslog seems to break journal logging. # FIXME: restarting syslog seems to break journal logging.
boot.systemd.services.syslog = systemd.services.syslog =
{ description = "Syslog Daemon"; { description = "Syslog Daemon";
requires = [ "syslog.socket" ]; requires = [ "syslog.socket" ];

View File

@ -270,14 +270,14 @@ in
target = "nix.machines"; target = "nix.machines";
}; };
boot.systemd.sockets."nix-daemon" = systemd.sockets."nix-daemon" =
{ description = "Nix Daemon Socket"; { description = "Nix Daemon Socket";
wantedBy = [ "sockets.target" ]; wantedBy = [ "sockets.target" ];
before = [ "multi-user.target" ]; before = [ "multi-user.target" ];
socketConfig.ListenStream = "/nix/var/nix/daemon-socket/socket"; socketConfig.ListenStream = "/nix/var/nix/daemon-socket/socket";
}; };
boot.systemd.services."nix-daemon" = systemd.services."nix-daemon" =
{ description = "Nix Daemon"; { description = "Nix Daemon";
path = [ nix pkgs.openssl pkgs.utillinux ] path = [ nix pkgs.openssl pkgs.utillinux ]

View File

@ -51,7 +51,7 @@ in
services.cron.systemCronJobs = mkIf cfg.automatic (singleton services.cron.systemCronJobs = mkIf cfg.automatic (singleton
"${cfg.dates} root ${config.system.build.systemd}/bin/systemctl start nix-gc.service"); "${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"; { description = "Nix Garbage Collector";
path = [ config.environment.nix ]; path = [ config.environment.nix ];
script = "exec nix-collect-garbage ${cfg.options}"; script = "exec nix-collect-garbage ${cfg.options}";

View File

@ -84,7 +84,7 @@ in
boot.extraTTYs = mkIf cfg.showManual ["tty${cfg.ttyNumber}"]; boot.extraTTYs = mkIf cfg.showManual ["tty${cfg.ttyNumber}"];
boot.systemd.services = optionalAttrs cfg.showManual systemd.services = optionalAttrs cfg.showManual
{ "nixos-manual" = { "nixos-manual" =
{ description = "NixOS Manual"; { description = "NixOS Manual";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];

View File

@ -40,7 +40,7 @@ in
boot.extraTTYs = [ cfg.tty ]; boot.extraTTYs = [ cfg.tty ];
boot.systemd.services.rogue = systemd.services.rogue =
{ description = "Rogue dungeon crawling game"; { description = "Rogue dungeon crawling game";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig = serviceConfig =

View File

@ -43,7 +43,7 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.etc = [ { source = datadog-conf; target = "dd-agent/datadog.conf"; } ]; environment.etc = [ { source = datadog-conf; target = "dd-agent/datadog.conf"; } ];
boot.systemd.services.dd-agent = { systemd.services.dd-agent = {
description = "Datadog agent monitor"; description = "Datadog agent monitor";
path = [ pkgs.sysstat pkgs.procps ]; path = [ pkgs.sysstat pkgs.procps ];

View File

@ -81,7 +81,7 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
boot.systemd.services.smartd = { systemd.services.smartd = {
description = "S.M.A.R.T. Daemon"; description = "S.M.A.R.T. Daemon";
environment.TZ = config.time.timeZone; environment.TZ = config.time.timeZone;

View File

@ -73,7 +73,7 @@ in
description = "Zabbix daemon user"; description = "Zabbix daemon user";
}; };
boot.systemd.services."zabbix-agent" = systemd.services."zabbix-agent" =
{ description = "Zabbix Agent"; { description = "Zabbix Agent";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];

View File

@ -73,7 +73,7 @@ in
description = "Zabbix daemon user"; description = "Zabbix daemon user";
}; };
boot.systemd.services."zabbix-server" = systemd.services."zabbix-server" =
{ description = "Zabbix Server"; { description = "Zabbix Server";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];

View File

@ -80,7 +80,7 @@ in
boot.kernelModules = [ "nfsd" ]; boot.kernelModules = [ "nfsd" ];
boot.systemd.services.nfsd = systemd.services.nfsd =
{ description = "NFS Server"; { description = "NFS Server";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
@ -108,7 +108,7 @@ in
serviceConfig.RemainAfterExit = true; serviceConfig.RemainAfterExit = true;
}; };
boot.systemd.services.mountd = systemd.services.mountd =
{ description = "NFSv3 Mount Daemon"; { description = "NFSv3 Mount Daemon";
requires = [ "rpcbind.service" ]; requires = [ "rpcbind.service" ];

View File

@ -200,7 +200,7 @@ in
}; };
boot.systemd = { systemd = {
targets.samba = { targets.samba = {
description = "Samba server"; description = "Samba server";
requires = [ "samba-setup.service" ]; requires = [ "samba-setup.service" ];

View File

@ -92,7 +92,7 @@ in
config = mkIf config.networking.useDHCP { config = mkIf config.networking.useDHCP {
boot.systemd.services.dhcpcd = systemd.services.dhcpcd =
{ description = "DHCP Client"; { description = "DHCP Client";
wantedBy = [ "network.target" ]; wantedBy = [ "network.target" ];

View File

@ -58,7 +58,7 @@ in
networking.enableIPv6 = true; networking.enableIPv6 = true;
boot.systemd.services.gogoclient = { systemd.services.gogoclient = {
description = "ipv6 tunnel"; description = "ipv6 tunnel";
after = [ "network.target" ]; after = [ "network.target" ];

View File

@ -11,7 +11,7 @@ let
makeOpenVPNJob = cfg: name: makeOpenVPNJob = cfg: name:
let let
path = (getAttr "openvpn-${name}" config.boot.systemd.services).path; path = (getAttr "openvpn-${name}" config.systemd.services).path;
upScript = '' upScript = ''
#! /bin/sh #! /bin/sh

View File

@ -65,7 +65,7 @@ in
environment.etc = [ netconfigFile ]; environment.etc = [ netconfigFile ];
boot.systemd.services.rpcbind = systemd.services.rpcbind =
{ description = "ONC RPC Directory Service"; { description = "ONC RPC Directory Service";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];

View File

@ -262,7 +262,7 @@ in
} }
]; ];
boot.systemd.services.sshd = systemd.services.sshd =
{ description = "SSH Daemon"; { description = "SSH Daemon";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];

View File

@ -118,7 +118,7 @@ in
# FIXME: these are copied verbatim from the dbus source tree. We # FIXME: these are copied verbatim from the dbus source tree. We
# should install and use the originals. # should install and use the originals.
boot.systemd.units."dbus.socket".text = systemd.units."dbus.socket".text =
'' ''
[Unit] [Unit]
Description=D-Bus System Message Bus Socket Description=D-Bus System Message Bus Socket
@ -127,7 +127,7 @@ in
ListenStream=/var/run/dbus/system_bus_socket ListenStream=/var/run/dbus/system_bus_socket
''; '';
boot.systemd.units."dbus.service".text = systemd.units."dbus.service".text =
'' ''
[Unit] [Unit]
Description=D-Bus System Message Bus Description=D-Bus System Message Bus

View File

@ -38,7 +38,7 @@ in
description = "Name service cache daemon user"; description = "Name service cache daemon user";
}; };
boot.systemd.services.nscd = systemd.services.nscd =
{ description = "Name Service Cache Daemon"; { description = "Name Service Cache Daemon";
wantedBy = [ "nss-lookup.target" "nss-user-lookup.target" ]; wantedBy = [ "nss-lookup.target" "nss-user-lookup.target" ];

View File

@ -39,7 +39,7 @@ with pkgs.lib;
# which some small modifications, which is annoying. # which some small modifications, which is annoying.
# Generate a separate job for each tty. # Generate a separate job for each tty.
boot.systemd.units."getty@.service".text = systemd.units."getty@.service".text =
'' ''
[Unit] [Unit]
Description=Getty on %I Description=Getty on %I
@ -76,7 +76,7 @@ with pkgs.lib;
X-RestartIfChanged=false X-RestartIfChanged=false
''; '';
boot.systemd.units."serial-getty@.service".text = systemd.units."serial-getty@.service".text =
'' ''
[Unit] [Unit]
Description=Serial Getty on %I Description=Serial Getty on %I

View File

@ -601,7 +601,7 @@ in
date.timezone = "${config.time.timeZone}" date.timezone = "${config.time.timeZone}"
''; '';
boot.systemd.services.httpd = systemd.services.httpd =
{ description = "Apache HTTPD"; { description = "Apache HTTPD";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];

View File

@ -386,9 +386,9 @@ in
environment.pathsToLink = environment.pathsToLink =
[ "/etc/xdg" "/share/xdg" "/share/applications" "/share/icons" "/share/pixmaps" ]; [ "/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"; { description = "X11 Server";
after = [ "systemd-udev-settle.service" "local-fs.target" ]; after = [ "systemd-udev-settle.service" "local-fs.target" ];

View File

@ -213,7 +213,7 @@ in
# just so we can set a restart trigger. Also make # just so we can set a restart trigger. Also make
# multi-user.target pull it in so that it gets started if it # multi-user.target pull it in so that it gets started if it
# failed earlier. # failed earlier.
boot.systemd.services."systemd-modules-load" = systemd.services."systemd-modules-load" =
{ description = "Load Kernel Modules"; { description = "Load Kernel Modules";
wantedBy = [ "sysinit.target" "multi-user.target" ]; wantedBy = [ "sysinit.target" "multi-user.target" ];
before = [ "sysinit.target" "shutdown.target" ]; before = [ "sysinit.target" "shutdown.target" ];

View File

@ -6,7 +6,7 @@ with pkgs.lib;
# This unit saves the value of the system clock to the hardware # This unit saves the value of the system clock to the hardware
# clock on shutdown. # clock on shutdown.
boot.systemd.units."save-hwclock.service" = systemd.units."save-hwclock.service" =
{ wantedBy = [ "shutdown.target" ]; { wantedBy = [ "shutdown.target" ];
text = text =

View File

@ -6,7 +6,7 @@ with import ./systemd-unit-options.nix { inherit config pkgs; };
let let
cfg = config.boot.systemd; cfg = config.systemd;
systemd = pkgs.systemd; systemd = pkgs.systemd;
@ -340,7 +340,7 @@ in
options = { options = {
boot.systemd.units = mkOption { systemd.units = mkOption {
description = "Definition of systemd units."; description = "Definition of systemd units.";
default = {}; default = {};
type = types.attrsOf types.optionSet; type = types.attrsOf types.optionSet;
@ -367,34 +367,34 @@ in
}; };
}; };
boot.systemd.packages = mkOption { systemd.packages = mkOption {
default = []; default = [];
type = types.listOf types.package; type = types.listOf types.package;
description = "Packages providing systemd units."; description = "Packages providing systemd units.";
}; };
boot.systemd.targets = mkOption { systemd.targets = mkOption {
default = {}; default = {};
type = types.attrsOf types.optionSet; type = types.attrsOf types.optionSet;
options = [ unitOptions unitConfig ]; options = [ unitOptions unitConfig ];
description = "Definition of systemd target units."; description = "Definition of systemd target units.";
}; };
boot.systemd.services = mkOption { systemd.services = mkOption {
default = {}; default = {};
type = types.attrsOf types.optionSet; type = types.attrsOf types.optionSet;
options = [ serviceOptions unitConfig serviceConfig ]; options = [ serviceOptions unitConfig serviceConfig ];
description = "Definition of systemd service units."; description = "Definition of systemd service units.";
}; };
boot.systemd.sockets = mkOption { systemd.sockets = mkOption {
default = {}; default = {};
type = types.attrsOf types.optionSet; type = types.attrsOf types.optionSet;
options = [ socketOptions unitConfig ]; options = [ socketOptions unitConfig ];
description = "Definition of systemd socket units."; description = "Definition of systemd socket units.";
}; };
boot.systemd.mounts = mkOption { systemd.mounts = mkOption {
default = []; default = [];
type = types.listOf types.optionSet; type = types.listOf types.optionSet;
options = [ mountOptions unitConfig mountConfig ]; options = [ mountOptions unitConfig mountConfig ];
@ -405,13 +405,13 @@ in
''; '';
}; };
boot.systemd.defaultUnit = mkOption { systemd.defaultUnit = mkOption {
default = "multi-user.target"; default = "multi-user.target";
type = types.uniq types.string; type = types.uniq types.string;
description = "Default unit started when the system boots."; description = "Default unit started when the system boots.";
}; };
boot.systemd.globalEnvironment = mkOption { systemd.globalEnvironment = mkOption {
type = types.attrs; type = types.attrs;
default = {}; default = {};
example = { TZ = "CET"; }; example = { TZ = "CET"; };
@ -500,11 +500,11 @@ in
''; '';
# Target for charon send-keys to hook into. # Target for charon send-keys to hook into.
boot.systemd.targets.keys = systemd.targets.keys =
{ description = "Security 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}.target" (targetToUnit n v)) cfg.targets
// mapAttrs' (n: v: nameValuePair "${n}.service" (serviceToUnit n v)) cfg.services // mapAttrs' (n: v: nameValuePair "${n}.service" (serviceToUnit n v)) cfg.services
// mapAttrs' (n: v: nameValuePair "${n}.socket" (socketToUnit n v)) cfg.sockets // mapAttrs' (n: v: nameValuePair "${n}.socket" (socketToUnit n v)) cfg.sockets

View File

@ -277,7 +277,7 @@ in
config = { config = {
boot.systemd.services = systemd.services =
flip mapAttrs' config.jobs (name: job: flip mapAttrs' config.jobs (name: job:
nameValuePair job.name job.unit); nameValuePair job.name job.unit);

View File

@ -177,13 +177,13 @@ in
}; };
# Provide a target that pulls in all filesystems. # Provide a target that pulls in all filesystems.
boot.systemd.targets.fs = systemd.targets.fs =
{ description = "All File Systems"; { description = "All File Systems";
wants = [ "local-fs.target" "remote-fs.target" ]; wants = [ "local-fs.target" "remote-fs.target" ];
}; };
# Emit systemd services to format requested filesystems. # Emit systemd services to format requested filesystems.
boot.systemd.services = systemd.services =
let let
formatDevice = fs: formatDevice = fs:

View File

@ -40,7 +40,7 @@ in
boot.initrd.kernelModules = mkIf inInitrd [ "nfs" ]; boot.initrd.kernelModules = mkIf inInitrd [ "nfs" ];
boot.systemd.services.statd = systemd.services.statd =
{ description = "NFSv3 Network Status Monitor"; { description = "NFSv3 Network Status Monitor";
path = [ pkgs.nfsUtils pkgs.sysvtools pkgs.utillinux ]; path = [ pkgs.nfsUtils pkgs.sysvtools pkgs.utillinux ];
@ -64,7 +64,7 @@ in
serviceConfig.Restart = "always"; serviceConfig.Restart = "always";
}; };
boot.systemd.services.idmapd = systemd.services.idmapd =
{ description = "NFSv4 ID Mapping Daemon"; { description = "NFSv4 ID Mapping Daemon";
path = [ pkgs.sysvtools pkgs.utillinux ]; path = [ pkgs.sysvtools pkgs.utillinux ];

View File

@ -74,7 +74,7 @@ in
# shipped with systemd, except that it uses /dev/tty1 instead of # shipped with systemd, except that it uses /dev/tty1 instead of
# /dev/tty0 to prevent putting the X server in non-raw mode, and # /dev/tty0 to prevent putting the X server in non-raw mode, and
# it has a restart trigger. # it has a restart trigger.
boot.systemd.services."systemd-vconsole-setup" = systemd.services."systemd-vconsole-setup" =
{ description = "Setup Virtual Console"; { description = "Setup Virtual Console";
before = [ "sysinit.target" "shutdown.target" ]; before = [ "sysinit.target" "shutdown.target" ];
unitConfig = unitConfig =

View File

@ -252,13 +252,13 @@ in
security.setuidPrograms = [ "ping" "ping6" ]; security.setuidPrograms = [ "ping" "ping6" ];
boot.systemd.targets."network-interfaces" = systemd.targets."network-interfaces" =
{ description = "All Network Interfaces"; { description = "All Network Interfaces";
wantedBy = [ "network.target" ]; wantedBy = [ "network.target" ];
unitConfig.X-StopOnReconfiguration = true; unitConfig.X-StopOnReconfiguration = true;
}; };
boot.systemd.services = systemd.services =
let let
networkSetup = networkSetup =

View File

@ -11,7 +11,7 @@ let kernel = config.boot.kernelPackages.kernel; in
config = { config = {
boot.systemd.services.backdoor = systemd.services.backdoor =
{ wantedBy = [ "multi-user.target" ]; { wantedBy = [ "multi-user.target" ];
requires = [ "dev-hvc0.device" "dev-ttyS0.device" ]; requires = [ "dev-hvc0.device" "dev-ttyS0.device" ];
after = [ "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 # Prevent agetty from being instantiated on ttyS0, since it
# interferes with the backdoor (writes to ttyS0 will randomly fail # interferes with the backdoor (writes to ttyS0 will randomly fail
# with EIO). Likewise for hvc0. # with EIO). Likewise for hvc0.
boot.systemd.services."serial-getty@ttyS0".enable = false; systemd.services."serial-getty@ttyS0".enable = false;
boot.systemd.services."serial-getty@hvc0".enable = false; systemd.services."serial-getty@hvc0".enable = false;
boot.initrd.postDeviceCommands = boot.initrd.postDeviceCommands =
'' ''
@ -77,7 +77,7 @@ let kernel = config.boot.kernelPackages.kernel; in
networking.defaultGateway = mkOverride 150 ""; networking.defaultGateway = mkOverride 150 "";
networking.nameservers = 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; [ system.requiredKernelConfig = with config.lib.kernelConfig; [
(isYes "SERIAL_8250_CONSOLE") (isYes "SERIAL_8250_CONSOLE")

View File

@ -19,7 +19,7 @@ in
{ {
require = [options]; require = [options];
boot.systemd.services."fetch-ec2-data" = systemd.services."fetch-ec2-data" =
{ description = "Fetch EC2 Data"; { description = "Fetch EC2 Data";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
@ -78,7 +78,7 @@ in
serviceConfig.RemainAfterExit = true; serviceConfig.RemainAfterExit = true;
}; };
boot.systemd.services."print-host-key" = systemd.services."print-host-key" =
{ description = "Print SSH Host Key"; { description = "Print SSH Host Key";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "sshd.service" ]; after = [ "sshd.service" ];

View File

@ -49,7 +49,7 @@ in
boot.kernelModules = [ "tun" ]; boot.kernelModules = [ "tun" ];
boot.systemd.services.libvirtd = systemd.services.libvirtd =
{ description = "Libvirt Virtual Machine Management Daemon"; { description = "Libvirt Virtual Machine Management Daemon";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];