3
0
Fork 0
forked from mirrors/nixpkgs

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>:
<programlisting>
boot.systemd.services.httpd.serviceConfig.CPUShares = 512;
systemd.services.httpd.serviceConfig.CPUShares = 512;
</programlisting>
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):
<programlisting>
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" ];
</programlisting>
</para>

View file

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

View file

@ -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" ];

View file

@ -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:

View file

@ -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" ];

View file

@ -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"

View file

@ -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" ];

View file

@ -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" ];

View file

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

View file

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

View file

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

View file

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

View file

@ -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 =

View file

@ -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" ];

View file

@ -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" ];

View file

@ -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 ]

View file

@ -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}";

View file

@ -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" ];

View file

@ -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 =

View file

@ -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 ];

View file

@ -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;

View file

@ -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" ];

View file

@ -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" ];

View file

@ -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" ];

View file

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

View file

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

View file

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

View file

@ -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

View file

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

View file

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

View file

@ -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

View file

@ -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" ];

View file

@ -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

View file

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

View file

@ -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" ];

View file

@ -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" ];

View file

@ -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 =

View file

@ -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

View file

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

View file

@ -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:

View file

@ -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 ];

View file

@ -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 =

View file

@ -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 =

View file

@ -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")

View file

@ -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" ];

View file

@ -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" ];