diff --git a/modules/services/audio/alsa.nix b/modules/services/audio/alsa.nix index c72449150d19..5f463f8d8cd3 100644 --- a/modules/services/audio/alsa.nix +++ b/modules/services/audio/alsa.nix @@ -45,7 +45,7 @@ in gid = config.ids.gids.audio; }; - jobAttrs.alsa = + jobs.alsa = { startOn = "udev"; preStart = diff --git a/modules/services/audio/pulseaudio.nix b/modules/services/audio/pulseaudio.nix index d322c6b51ea1..5a8ffbd30a18 100644 --- a/modules/services/audio/pulseaudio.nix +++ b/modules/services/audio/pulseaudio.nix @@ -62,7 +62,7 @@ in inherit gid; }; - jobAttrs.pulseaudio = + jobs.pulseaudio = { description = "PulseAudio system-wide server"; startOn = "startup"; diff --git a/modules/services/databases/mysql.nix b/modules/services/databases/mysql.nix index 9e7a0543c9d0..5d16ebe0af4c 100644 --- a/modules/services/databases/mysql.nix +++ b/modules/services/databases/mysql.nix @@ -72,7 +72,7 @@ in environment.systemPackages = [mysql]; - jobAttrs.mysql = + jobs.mysql = { description = "MySQL server"; startOn = "filesystems"; diff --git a/modules/services/databases/postgresql.nix b/modules/services/databases/postgresql.nix index 207701f13551..b463e39c7257 100644 --- a/modules/services/databases/postgresql.nix +++ b/modules/services/databases/postgresql.nix @@ -113,7 +113,7 @@ in environment.systemPackages = [postgresql]; - jobAttrs.postgresql = + jobs.postgresql = { description = "PostgreSQL server"; startOn = "${startDependency}/started"; diff --git a/modules/services/hardware/acpid.nix b/modules/services/hardware/acpid.nix index 595153b0af9a..ebb2f2a6a05b 100644 --- a/modules/services/hardware/acpid.nix +++ b/modules/services/hardware/acpid.nix @@ -76,7 +76,7 @@ in config = mkIf config.powerManagement.enable { - jobAttrs.acpid = + jobs.acpid = { description = "ACPI daemon"; startOn = "udev"; diff --git a/modules/services/hardware/hal.nix b/modules/services/hardware/hal.nix index 94831b627782..5ac01d3b0985 100644 --- a/modules/services/hardware/hal.nix +++ b/modules/services/hardware/hal.nix @@ -64,7 +64,7 @@ in gid = config.ids.gids.haldaemon; }; - jobAttrs.hal = + jobs.hal = { description = "HAL daemon"; # !!! TODO: make sure that HAL starts after acpid, diff --git a/modules/services/hardware/udev.nix b/modules/services/hardware/udev.nix index 91e933f4b03a..d819527fb234 100644 --- a/modules/services/hardware/udev.nix +++ b/modules/services/hardware/udev.nix @@ -152,7 +152,7 @@ in services.udev.packages = [extraUdevRules]; - jobAttrs.udev = + jobs.udev = { startOn = "startup"; stopOn = "shutdown"; diff --git a/modules/services/logging/klogd.nix b/modules/services/logging/klogd.nix index f8c26e0f1666..0b2e3d9ddc7e 100644 --- a/modules/services/logging/klogd.nix +++ b/modules/services/logging/klogd.nix @@ -10,7 +10,7 @@ in { - jobAttrs.klogd = + jobs.klogd = { description = "Kernel log daemon"; startOn = "syslogd"; diff --git a/modules/services/logging/syslogd.nix b/modules/services/logging/syslogd.nix index a1679f71bc2a..bc6b6eb43899 100644 --- a/modules/services/logging/syslogd.nix +++ b/modules/services/logging/syslogd.nix @@ -47,7 +47,7 @@ in config = { - jobAttrs.syslogd = + jobs.syslogd = { description = "Syslog daemon"; startOn = "udev"; diff --git a/modules/services/mail/dovecot.nix b/modules/services/mail/dovecot.nix index 950c748ff8c3..8ddbe5bfd7b5 100644 --- a/modules/services/mail/dovecot.nix +++ b/modules/services/mail/dovecot.nix @@ -113,7 +113,7 @@ in gid = config.ids.gids.dovecot; }; - jobAttrs.dovecot = + jobs.dovecot = { description = "Dovecot IMAP/POP3 server"; startOn = "${startingDependency}/started"; diff --git a/modules/services/mail/postfix.nix b/modules/services/mail/postfix.nix index ec2186089806..b5ed10d957b2 100644 --- a/modules/services/mail/postfix.nix +++ b/modules/services/mail/postfix.nix @@ -275,7 +275,7 @@ in } ]; - jobAttrs.postfix = + jobs.postfix = # I copy _lots_ of shipped configuration filed # that can be left as is. I am afraid the exact # will list slightly change in next Postfix diff --git a/modules/services/misc/autofs.nix b/modules/services/misc/autofs.nix index 757d38a12809..b9936d0249d6 100644 --- a/modules/services/misc/autofs.nix +++ b/modules/services/misc/autofs.nix @@ -72,7 +72,7 @@ in source = pkgs.writeText "auto.master" cfg.autoMaster; }; - jobAttrs.autofs = + jobs.autofs = { description = "Filesystem automounter"; startOn = "network-interfaces/started"; diff --git a/modules/services/misc/disnix.nix b/modules/services/misc/disnix.nix index bae74826da13..225762813ee2 100644 --- a/modules/services/misc/disnix.nix +++ b/modules/services/misc/disnix.nix @@ -36,7 +36,7 @@ in services.dbus.enable = true; services.dbus.packages = [ pkgs.disnix ]; - jobAttrs.disnix = + jobs.disnix = { description = "Disnix server"; startOn = "dbus"; diff --git a/modules/services/misc/gpsd.nix b/modules/services/misc/gpsd.nix index ba2d550f4614..98feef682315 100644 --- a/modules/services/misc/gpsd.nix +++ b/modules/services/misc/gpsd.nix @@ -85,7 +85,7 @@ in inherit gid; }; - jobAttrs.gpsd = + jobs.gpsd = { description = "GPSD daemon"; startOn = "network-interfaces/started"; diff --git a/modules/services/misc/nix-daemon.nix b/modules/services/misc/nix-daemon.nix index 479c4fa4a28f..7c40dbe12f4f 100644 --- a/modules/services/misc/nix-daemon.nix +++ b/modules/services/misc/nix-daemon.nix @@ -188,7 +188,7 @@ in target = "nix.machines"; }; - jobAttrs.nixDaemon = + jobs.nixDaemon = { startOn = "startup"; script = diff --git a/modules/services/misc/nixos-manual.nix b/modules/services/misc/nixos-manual.nix index 78c120872c87..a5a3e8977da6 100644 --- a/modules/services/misc/nixos-manual.nix +++ b/modules/services/misc/nixos-manual.nix @@ -72,7 +72,7 @@ in boot.extraTTYs = mkIf cfg.showManual [cfg.ttyNumber]; - jobAttrs = mkIf cfg.showManual + jobs = mkIf cfg.showManual { nixosManual = { name = "nixos-manual"; diff --git a/modules/services/misc/rogue.nix b/modules/services/misc/rogue.nix index 11d185f74090..a128e7f7cdb4 100644 --- a/modules/services/misc/rogue.nix +++ b/modules/services/misc/rogue.nix @@ -40,7 +40,7 @@ in boot.extraTTYs = [ cfg.tty ]; - jobAttrs.rogue = + jobs.rogue = { description = "Rogue dungeon crawling game"; startOn = "udev"; diff --git a/modules/services/misc/synergy.nix b/modules/services/misc/synergy.nix index 88226755e664..72eaf640ea85 100644 --- a/modules/services/misc/synergy.nix +++ b/modules/services/misc/synergy.nix @@ -68,7 +68,7 @@ in config = { - jobAttrs = + jobs = optionalAttrs cfgC.enable { synergyClient = diff --git a/modules/services/monitoring/nagios/default.nix b/modules/services/monitoring/nagios/default.nix index dc060e675da6..78e6a276fc8a 100644 --- a/modules/services/monitoring/nagios/default.nix +++ b/modules/services/monitoring/nagios/default.nix @@ -158,7 +158,7 @@ in environment.systemPackages = [ pkgs.nagios ]; - jobAttrs.nagios = + jobs.nagios = { # Run `nagios -v' to check the validity of the configuration file so # that a nixos-rebuild fails *before* we kill the running Nagios # daemon. diff --git a/modules/services/monitoring/zabbix-agent.nix b/modules/services/monitoring/zabbix-agent.nix index f3559ef8ba4e..9fbcad78c682 100644 --- a/modules/services/monitoring/zabbix-agent.nix +++ b/modules/services/monitoring/zabbix-agent.nix @@ -64,7 +64,7 @@ in description = "Zabbix daemon user"; }; - jobAttrs.zabbix_agent = + jobs.zabbix_agent = { #name = "zabbix-agent"; !!! mkIf bug description = "Zabbix agent daemon"; diff --git a/modules/services/monitoring/zabbix-server.nix b/modules/services/monitoring/zabbix-server.nix index c41fc93ac1d6..9b006ed8ec2a 100644 --- a/modules/services/monitoring/zabbix-server.nix +++ b/modules/services/monitoring/zabbix-server.nix @@ -51,7 +51,7 @@ in description = "Zabbix daemon user"; }; - jobAttrs.zabbix_server = + jobs.zabbix_server = { #name = "zabbix-server"; !!! mkIf bug description = "Zabbix server daemon"; diff --git a/modules/services/network-filesystems/nfs-kernel.nix b/modules/services/network-filesystems/nfs-kernel.nix index 624e224fb36b..1f67d584b895 100644 --- a/modules/services/network-filesystems/nfs-kernel.nix +++ b/modules/services/network-filesystems/nfs-kernel.nix @@ -76,7 +76,7 @@ in target = "exports"; }; - jobAttrs.nfs_kernel_exports = + jobs.nfs_kernel_exports = { name = "nfs-kernel-exports"; description = "Kernel NFS server"; @@ -106,7 +106,7 @@ in ''; }; - jobAttrs.nfs_kernel_nfsd = + jobs.nfs_kernel_nfsd = { name = "nfs-kernel-nfsd"; description = "Kernel NFS server"; @@ -117,7 +117,7 @@ in exec = "${pkgs.nfsUtils}/sbin/rpc.nfsd ${if cfg.hostName != null then "-H ${cfg.hostName}" else ""} ${builtins.toString cfg.nproc}"; }; - jobAttrs.nfs_kernel_mountd = + jobs.nfs_kernel_mountd = { name = "nfs-kernel-mountd"; description = "Kernel NFS server - mount daemon"; @@ -128,7 +128,7 @@ in exec = "${pkgs.nfsUtils}/sbin/rpc.mountd -F -f ${exports}"; }; - jobAttrs.nfs_kernel_statd = + jobs.nfs_kernel_statd = { name = "nfs-kernel-statd"; description = "Kernel NFS server - Network Status Monitor"; diff --git a/modules/services/network-filesystems/samba.nix b/modules/services/network-filesystems/samba.nix index 177a2f5128e2..98d58e9f7f4a 100644 --- a/modules/services/network-filesystems/samba.nix +++ b/modules/services/network-filesystems/samba.nix @@ -164,7 +164,7 @@ in }); # Dummy job to start the real Samba daemons (nmbd, smbd, winbindd). - jobAttrs.sambaControl = + jobs.sambaControl = { name = "samba"; description = "Samba server"; @@ -176,11 +176,11 @@ in # nmbd says "standard input is not a socket, assuming -D option", # but using -i makes it stay in foreground (?) - jobAttrs.nmbd = daemonJob "nmbd" " -i -F"; + jobs.nmbd = daemonJob "nmbd" " -i -F"; - jobAttrs.smbd = daemonJob "smbd" " -i -F"; + jobs.smbd = daemonJob "smbd" " -i -F"; - jobAttrs.winbindd = daemonJob "winbindd" " -F"; + jobs.winbindd = daemonJob "winbindd" " -F"; }; diff --git a/modules/services/networking/avahi-daemon.nix b/modules/services/networking/avahi-daemon.nix index 34e2a83754d0..f3033e8a4089 100644 --- a/modules/services/networking/avahi-daemon.nix +++ b/modules/services/networking/avahi-daemon.nix @@ -115,7 +115,7 @@ in environment.systemPackages = [ avahi ]; - jobAttrs.avahi_daemon = + jobs.avahi_daemon = { name = "avahi-daemon"; startOn = "network-interfaces/started"; diff --git a/modules/services/networking/bind.nix b/modules/services/networking/bind.nix index d1a137f3502b..c93c2a9b00e6 100644 --- a/modules/services/networking/bind.nix +++ b/modules/services/networking/bind.nix @@ -105,7 +105,7 @@ in config = mkIf config.services.bind.enable { - jobAttrs.bind = + jobs.bind = { description = "BIND name server job"; preStart = diff --git a/modules/services/networking/bitlbee.nix b/modules/services/networking/bitlbee.nix index c55adb49335f..2aa51603d058 100644 --- a/modules/services/networking/bitlbee.nix +++ b/modules/services/networking/bitlbee.nix @@ -64,7 +64,7 @@ in gid = config.ids.gids.bitlbee; }; - jobAttrs.bitlbee = + jobs.bitlbee = { description = "BitlBee IRC to other chat networks gateway"; startOn = "network-interfaces/started"; diff --git a/modules/services/networking/ddclient.nix b/modules/services/networking/ddclient.nix index 03172592c16e..b5bffa83cd72 100644 --- a/modules/services/networking/ddclient.nix +++ b/modules/services/networking/ddclient.nix @@ -110,7 +110,7 @@ in home = stateDir; }; - jobAttrs.ddclient = + jobs.ddclient = { name = "ddclient"; startOn = "startup"; diff --git a/modules/services/networking/dhclient.nix b/modules/services/networking/dhclient.nix index 5ec87148172b..9696c8b14aa6 100644 --- a/modules/services/networking/dhclient.nix +++ b/modules/services/networking/dhclient.nix @@ -61,7 +61,7 @@ in config = mkIf config.networking.useDHCP { - jobAttrs.dhclient = + jobs.dhclient = { startOn = "network-interfaces/started"; stopOn = "network-interfaces/stop"; diff --git a/modules/services/networking/dhcpd.nix b/modules/services/networking/dhcpd.nix index 5a2d9034dfd5..6daa0c073b8d 100644 --- a/modules/services/networking/dhcpd.nix +++ b/modules/services/networking/dhcpd.nix @@ -108,7 +108,7 @@ in config = mkIf config.services.dhcpd.enable { - jobAttrs.dhcpd = + jobs.dhcpd = { description = "DHCP server"; startOn = "network-interfaces/started"; diff --git a/modules/services/networking/ejabberd.nix b/modules/services/networking/ejabberd.nix index 8ef910e1262e..7b341bc86046 100644 --- a/modules/services/networking/ejabberd.nix +++ b/modules/services/networking/ejabberd.nix @@ -50,7 +50,7 @@ in config = mkIf cfg.enable { - jobAttrs.ejabberd = + jobs.ejabberd = { description = "EJabberd server"; startOn = "network-interface/started"; diff --git a/modules/services/networking/firewall.nix b/modules/services/networking/firewall.nix index f6353fdc37de..0b8a8d930617 100644 --- a/modules/services/networking/firewall.nix +++ b/modules/services/networking/firewall.nix @@ -78,7 +78,7 @@ in environment.systemPackages = [pkgs.iptables]; - jobAttrs.firewall = + jobs.firewall = { startOn = "network-interfaces/started"; preStart = diff --git a/modules/services/networking/gnunet.nix b/modules/services/networking/gnunet.nix index 4f9723fc304b..e35dfbcd1a8e 100644 --- a/modules/services/networking/gnunet.nix +++ b/modules/services/networking/gnunet.nix @@ -191,7 +191,7 @@ in home = "/var/empty"; }; - jobAttrs.gnunetd = + jobs.gnunetd = { description = "The GNUnet Daemon"; startOn = "network-interfaces/started"; diff --git a/modules/services/networking/gw6c.nix b/modules/services/networking/gw6c.nix index 961940d534ad..143fe57979aa 100644 --- a/modules/services/networking/gw6c.nix +++ b/modules/services/networking/gw6c.nix @@ -129,7 +129,7 @@ in config = mkIf cfg.enable { - jobAttrs.gw6c = + jobs.gw6c = { description = "Gateway6 client"; startOn = if cfg.autorun then "network-interfaces/started" else ""; diff --git a/modules/services/networking/ifplugd.nix b/modules/services/networking/ifplugd.nix index 021e7f8fecf6..85eda29f5a27 100644 --- a/modules/services/networking/ifplugd.nix +++ b/modules/services/networking/ifplugd.nix @@ -55,7 +55,7 @@ in config = mkIf config.networking.interfaceMonitor.enable { - jobAttrs.ifplugd = + jobs.ifplugd = { description = "Network interface connectivity monitor"; startOn = "network-interfaces/started"; diff --git a/modules/services/networking/ircd-hybrid.nix b/modules/services/networking/ircd-hybrid.nix index e59f9a8fa4f5..aea5fbd6550e 100644 --- a/modules/services/networking/ircd-hybrid.nix +++ b/modules/services/networking/ircd-hybrid.nix @@ -117,7 +117,7 @@ in users.extraGroups = singleton { name = "ircd"; }; - jobAttrs.ircd_hybrid = + jobs.ircd_hybrid = { # name = "ircd-hybrid"; !!! mkIf bug description = "IRCD Hybrid server"; diff --git a/modules/services/networking/ntpd.nix b/modules/services/networking/ntpd.nix index 711682c9dce4..159c8022442d 100644 --- a/modules/services/networking/ntpd.nix +++ b/modules/services/networking/ntpd.nix @@ -70,7 +70,7 @@ in home = stateDir; }; - jobAttrs.ntpd = + jobs.ntpd = { description = "NTP daemon"; startOn = "ip-up"; diff --git a/modules/services/networking/openfire.nix b/modules/services/networking/openfire.nix index e009498546c8..67e2558b22a1 100644 --- a/modules/services/networking/openfire.nix +++ b/modules/services/networking/openfire.nix @@ -49,7 +49,7 @@ in message = "openfire assertion failed"; }; - jobAttrs.openfire = + jobs.openfire = { description = "OpenFire XMPP server"; startOn = "${startDependency}/started"; diff --git a/modules/services/networking/openvpn.nix b/modules/services/networking/openvpn.nix index f7a8f51d9b1a..b02f18e6b281 100644 --- a/modules/services/networking/openvpn.nix +++ b/modules/services/networking/openvpn.nix @@ -121,7 +121,7 @@ in config = mkIf cfg.enable { - jobAttrs = listToAttrs (map (c: nameValuePair "openvpn-${cfg.id}" (makeOpenVPNJob c)) cfg.servers); + jobs = listToAttrs (map (c: nameValuePair "openvpn-${cfg.id}" (makeOpenVPNJob c)) cfg.servers); }; diff --git a/modules/services/networking/portmap.nix b/modules/services/networking/portmap.nix index 08cd2457bcc5..0fcbf63d7991 100644 --- a/modules/services/networking/portmap.nix +++ b/modules/services/networking/portmap.nix @@ -63,7 +63,7 @@ in inherit gid; }; - jobAttrs.portmap = + jobs.portmap = { description = "ONC RPC portmap"; startOn = "network-interfaces/started"; diff --git a/modules/services/networking/privoxy.nix b/modules/services/networking/privoxy.nix index 4c8a50a5d701..f2350f4c4622 100644 --- a/modules/services/networking/privoxy.nix +++ b/modules/services/networking/privoxy.nix @@ -77,7 +77,7 @@ in home = stateDir; }; - jobAttrs.privoxy = + jobs.privoxy = { name = "privoxy"; startOn = "startup"; diff --git a/modules/services/networking/ssh/lshd.nix b/modules/services/networking/ssh/lshd.nix index 35eaa0c743f8..c3a14ba17e89 100644 --- a/modules/services/networking/ssh/lshd.nix +++ b/modules/services/networking/ssh/lshd.nix @@ -116,7 +116,7 @@ in config = mkIf cfg.enable { - jobAttrs.lshd = + jobs.lshd = { description = "GNU lshd SSH2 daemon"; startOn = "network-interfaces/started"; diff --git a/modules/services/networking/ssh/sshd.nix b/modules/services/networking/ssh/sshd.nix index 01ade07761c2..8c18a560748b 100644 --- a/modules/services/networking/ssh/sshd.nix +++ b/modules/services/networking/ssh/sshd.nix @@ -108,7 +108,7 @@ in home = "/var/empty"; }; - jobAttrs.sshd = { + jobs.sshd = { description = "OpenSSH server"; diff --git a/modules/services/networking/vsftpd.nix b/modules/services/networking/vsftpd.nix index 2a567f3ec90c..b98a9aa3f7d3 100644 --- a/modules/services/networking/vsftpd.nix +++ b/modules/services/networking/vsftpd.nix @@ -99,7 +99,7 @@ in gid = config.ids.gids.ftp; }; - jobAttrs.vsftpd = + jobs.vsftpd = { description = "vsftpd server"; startOn = "network-interfaces/started"; diff --git a/modules/services/networking/wpa_supplicant.nix b/modules/services/networking/wpa_supplicant.nix index c566452f9f7c..37b5923421fd 100644 --- a/modules/services/networking/wpa_supplicant.nix +++ b/modules/services/networking/wpa_supplicant.nix @@ -37,7 +37,7 @@ in environment.systemPackages = [pkgs.wpa_supplicant]; - jobAttrs.wpa_supplicant = + jobs.wpa_supplicant = { startOn = "network-interfaces/started"; stopOn = "network-interfaces/stop"; diff --git a/modules/services/networking/xinetd.nix b/modules/services/networking/xinetd.nix index 41d6873d6608..be9e5712e7de 100644 --- a/modules/services/networking/xinetd.nix +++ b/modules/services/networking/xinetd.nix @@ -119,7 +119,7 @@ in config = mkIf cfg.enable { - jobAttrs.xinetd = + jobs.xinetd = { description = "xinetd server"; startOn = "network-interfaces/started"; diff --git a/modules/services/printing/cupsd.nix b/modules/services/printing/cupsd.nix index f6c65250162b..3c7944261edd 100644 --- a/modules/services/printing/cupsd.nix +++ b/modules/services/printing/cupsd.nix @@ -155,7 +155,7 @@ in } ]; - jobAttrs.cupsd = + jobs.cupsd = { description = "CUPS printing daemon"; startOn = "network-interfaces/started"; diff --git a/modules/services/scheduling/atd.nix b/modules/services/scheduling/atd.nix index 38e5dad6bd4b..fb579dbf0b2a 100644 --- a/modules/services/scheduling/atd.nix +++ b/modules/services/scheduling/atd.nix @@ -63,7 +63,7 @@ in gid = config.ids.gids.atd; }; - jobAttrs.atd = + jobs.atd = { description = "at daemon (atd)"; startOn = "startup"; diff --git a/modules/services/scheduling/cron.nix b/modules/services/scheduling/cron.nix index 19ea49619ec8..930162f1c732 100644 --- a/modules/services/scheduling/cron.nix +++ b/modules/services/scheduling/cron.nix @@ -66,7 +66,7 @@ in environment.systemPackages = [pkgs.cron]; - jobAttrs.cron = + jobs.cron = { description = "Cron daemon"; startOn = "startup"; diff --git a/modules/services/scheduling/fcron.nix b/modules/services/scheduling/fcron.nix index 18b002ef3878..b38a70b932af 100644 --- a/modules/services/scheduling/fcron.nix +++ b/modules/services/scheduling/fcron.nix @@ -97,7 +97,7 @@ in environment.systemPackages = [ pkgs.fcron ]; - jobAttrs.fcron = + jobs.fcron = { description = "fcron daemon"; startOn = "startup"; diff --git a/modules/services/system/dbus.nix b/modules/services/system/dbus.nix index 86c1887f57da..4011c3b3335d 100644 --- a/modules/services/system/dbus.nix +++ b/modules/services/system/dbus.nix @@ -113,7 +113,7 @@ in gid = config.ids.gids.messagebus; }; - jobAttrs.dbus = + jobs.dbus = { startOn = "udev"; stopOn = "shutdown"; diff --git a/modules/services/system/nscd.nix b/modules/services/system/nscd.nix index 3dfc6d3a468e..a14215c70d1b 100644 --- a/modules/services/system/nscd.nix +++ b/modules/services/system/nscd.nix @@ -17,7 +17,7 @@ in description = "Name service cache daemon user"; }; - jobAttrs.nscd = + jobs.nscd = { description = "Name Service Cache Daemon"; startOn = "startup"; diff --git a/modules/services/system/uptimed.nix b/modules/services/system/uptimed.nix index 259363024fc4..3749358ac208 100644 --- a/modules/services/system/uptimed.nix +++ b/modules/services/system/uptimed.nix @@ -49,7 +49,7 @@ in home = stateDir; }; - jobAttrs.uptimed = + jobs.uptimed = { description = "Uptimed daemon"; startOn = "startup"; diff --git a/modules/services/ttys/gpm.nix b/modules/services/ttys/gpm.nix index fdc1db2878ce..026ed4a299f5 100644 --- a/modules/services/ttys/gpm.nix +++ b/modules/services/ttys/gpm.nix @@ -38,7 +38,7 @@ in config = mkIf cfg.enable { - jobAttrs.gpm = + jobs.gpm = { description = "General purpose mouse"; startOn = "udev"; diff --git a/modules/services/ttys/mingetty.nix b/modules/services/ttys/mingetty.nix index bbe3dd38c78e..6c793ffa1122 100644 --- a/modules/services/ttys/mingetty.nix +++ b/modules/services/ttys/mingetty.nix @@ -53,7 +53,7 @@ with pkgs.lib; config = { # Generate a separate job for each tty. - jobAttrs = listToAttrs (map (tty: nameValuePair tty { + jobs = listToAttrs (map (tty: nameValuePair tty { startOn = "udev"; diff --git a/modules/services/web-servers/apache-httpd/default.nix b/modules/services/web-servers/apache-httpd/default.nix index 6470b64d6be4..24c3077e0a92 100644 --- a/modules/services/web-servers/apache-httpd/default.nix +++ b/modules/services/web-servers/apache-httpd/default.nix @@ -559,7 +559,7 @@ in environment.systemPackages = [httpd] ++ concatMap (svc: svc.extraPath) allSubservices; - jobAttrs.httpd = + jobs.httpd = { # Statically verify the syntactic correctness of the generated # httpd.conf. !!! this is impure! It doesn't just check for # syntax, but also whether the Apache user/group exist, diff --git a/modules/services/web-servers/jboss.nix b/modules/services/web-servers/jboss.nix index 9d81f75a83dd..bf7a8090b193 100644 --- a/modules/services/web-servers/jboss.nix +++ b/modules/services/web-servers/jboss.nix @@ -70,7 +70,7 @@ in config = mkIf config.services.jboss.enable { - jobAttrs.jboss = + jobs.jboss = { description = "JBoss server"; exec = "${jbossService}/bin/control start"; diff --git a/modules/services/web-servers/tomcat.nix b/modules/services/web-servers/tomcat.nix index 613e1204f50a..331653ba9296 100644 --- a/modules/services/web-servers/tomcat.nix +++ b/modules/services/web-servers/tomcat.nix @@ -101,7 +101,7 @@ in home = "/homeless-shelter"; }; - jobAttrs.tomcat = + jobs.tomcat = { description = "Apache Tomcat server"; startOn = "network-interface/started"; diff --git a/modules/services/x11/xfs.nix b/modules/services/x11/xfs.nix index 4f4d278fadb4..860d5823be36 100644 --- a/modules/services/x11/xfs.nix +++ b/modules/services/x11/xfs.nix @@ -40,7 +40,7 @@ in message = "Please enable fontDir (fonts.enableFontDir) to use xfs."; }; - jobAttrs.xfs = + jobs.xfs = { description = "X Font Server"; startOn = "${startingDependency}/started"; diff --git a/modules/services/x11/xserver.nix b/modules/services/x11/xserver.nix index cbfcfbd186bd..1cf36e9ad705 100644 --- a/modules/services/x11/xserver.nix +++ b/modules/services/x11/xserver.nix @@ -348,7 +348,7 @@ in services.hal.packages = halConfigFiles; - jobAttrs.xserver = + jobs.xserver = { startOn = if cfg.autorun then "hal" else "never"; environment = diff --git a/modules/system/upstart-events/ctrl-alt-delete.nix b/modules/system/upstart-events/ctrl-alt-delete.nix index 3fb6c12c25d4..ae1ba2e342e1 100644 --- a/modules/system/upstart-events/ctrl-alt-delete.nix +++ b/modules/system/upstart-events/ctrl-alt-delete.nix @@ -3,7 +3,7 @@ ###### implementation { - jobAttrs.ctrl_alt_delete = + jobs.ctrl_alt_delete = { name = "ctrl-alt-delete"; startOn = "ctrlaltdel"; diff --git a/modules/system/upstart-events/halt.nix b/modules/system/upstart-events/halt.nix index c7721eb3e285..36efc3fe2cf5 100644 --- a/modules/system/upstart-events/halt.nix +++ b/modules/system/upstart-events/halt.nix @@ -116,6 +116,6 @@ let in { - jobAttrs = listToAttrs (map (n: nameValuePair "sys-${n}" (jobFun n)) + jobs = listToAttrs (map (n: nameValuePair "sys-${n}" (jobFun n)) [ "reboot" "halt" "system-halt" "power-off" ] ); } diff --git a/modules/system/upstart-events/maintenance-shell.nix b/modules/system/upstart-events/maintenance-shell.nix index 6c9d32b625cb..a8eceb93158a 100644 --- a/modules/system/upstart-events/maintenance-shell.nix +++ b/modules/system/upstart-events/maintenance-shell.nix @@ -3,7 +3,7 @@ ###### implementation { - jobAttrs.maintenance_shell = + jobs.maintenance_shell = { name = "maintenance-shell"; startOn = [ "maintenance" "stalled" ]; diff --git a/modules/system/upstart/upstart.nix b/modules/system/upstart/upstart.nix index 7f0531090822..bb6a4f9a117f 100644 --- a/modules/system/upstart/upstart.nix +++ b/modules/system/upstart/upstart.nix @@ -73,10 +73,9 @@ let echo "$jobText" > $out/etc/event.d/${job.name} ''; - jobs = [pkgs.upstart] # for the built-in logd job - ++ map (job: job.upstartPkg) (attrValues config.jobAttrs); + ++ map (job: job.upstartPkg) (attrValues config.jobs); # Create an etc/event.d directory containing symlinks to the # specified list of Upstart job files. @@ -249,7 +248,7 @@ in options = { - jobAttrs = mkOption { + jobs = mkOption { default = {}; description = '' This option defines the system jobs started and managed by the diff --git a/modules/tasks/filesystems.nix b/modules/tasks/filesystems.nix index 86eaaf0c429a..cce4ce594064 100644 --- a/modules/tasks/filesystems.nix +++ b/modules/tasks/filesystems.nix @@ -233,7 +233,7 @@ in # Add the mount helpers to the system path so that `mount' can find them. environment.systemPackages = [pkgs.ntfs3g pkgs.mount_cifs pkgs.nfsUtils]; - jobAttrs.filesystems = + jobs.filesystems = { startOn = [ "startup" "new-devices" "ip-up" ]; script = task; diff --git a/modules/tasks/kbd.nix b/modules/tasks/kbd.nix index d1c9e4bab354..9ba7f973cf33 100644 --- a/modules/tasks/kbd.nix +++ b/modules/tasks/kbd.nix @@ -56,7 +56,7 @@ in environment.systemPackages = [pkgs.kbd]; - jobAttrs.kbd = + jobs.kbd = { description = "Keyboard / console initialisation"; startOn = "udev"; diff --git a/modules/tasks/lvm.nix b/modules/tasks/lvm.nix index 28fb293821a0..4da517deae10 100644 --- a/modules/tasks/lvm.nix +++ b/modules/tasks/lvm.nix @@ -6,7 +6,7 @@ config = { - jobAttrs.lvm = + jobs.lvm = { startOn = " udev"; # !!! or on new-devices script = diff --git a/modules/tasks/network-interfaces.nix b/modules/tasks/network-interfaces.nix index 50c2c73823d1..4b53da876dad 100644 --- a/modules/tasks/network-interfaces.nix +++ b/modules/tasks/network-interfaces.nix @@ -132,7 +132,7 @@ in pkgs.wirelesstools ]; - jobAttrs.networkInterfaces = + jobs.networkInterfaces = { name = "network-interfaces"; startOn = "udev"; diff --git a/modules/tasks/swap.nix b/modules/tasks/swap.nix index ae4cd3a5c491..ad9d94f8ea68 100644 --- a/modules/tasks/swap.nix +++ b/modules/tasks/swap.nix @@ -66,7 +66,7 @@ in config = { - jobAttrs.swap = + jobs.swap = { task = true; startOn = ["startup" "new-devices"]; diff --git a/modules/tasks/swraid.nix b/modules/tasks/swraid.nix index d9419fadb11b..6e29062f0a96 100644 --- a/modules/tasks/swraid.nix +++ b/modules/tasks/swraid.nix @@ -12,7 +12,7 @@ in { - jobAttrs.swraid = + jobs.swraid = { startOn = "udev"; # !!! or on "new-devices" script = diff --git a/modules/tasks/tty-backgrounds.nix b/modules/tasks/tty-backgrounds.nix index 2abcf068e41d..d15365fab9dc 100644 --- a/modules/tasks/tty-backgrounds.nix +++ b/modules/tasks/tty-backgrounds.nix @@ -102,7 +102,7 @@ in target = "splash"; }; - jobAttrs.ttyBackgrounds = + jobs.ttyBackgrounds = { name = "tty-backgrounds"; startOn = "udev"; diff --git a/modules/testing/test-instrumentation.nix b/modules/testing/test-instrumentation.nix index a3c874d4fa56..64f7729cd733 100644 --- a/modules/testing/test-instrumentation.nix +++ b/modules/testing/test-instrumentation.nix @@ -9,7 +9,7 @@ with pkgs.lib; config = { - jobAttrs.backdoor = + jobs.backdoor = { startOn = "network-interfaces"; preStart =