summary refs log tree commit diff
path: root/modules/services/networking/ifplugd.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2009-10-12 17:09:38 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2009-10-12 17:09:38 +0000
commit9943e0762e1589e37c3653c3812967f303225277 (patch)
treeb660142c1b04074702f7007cfaa616185d03bcd0 /modules/services/networking/ifplugd.nix
parente91d882a946fc736f62235296e77c139cee7d9b3 (diff)
downloadnixlib-9943e0762e1589e37c3653c3812967f303225277.tar
nixlib-9943e0762e1589e37c3653c3812967f303225277.tar.gz
nixlib-9943e0762e1589e37c3653c3812967f303225277.tar.bz2
nixlib-9943e0762e1589e37c3653c3812967f303225277.tar.lz
nixlib-9943e0762e1589e37c3653c3812967f303225277.tar.xz
nixlib-9943e0762e1589e37c3653c3812967f303225277.tar.zst
nixlib-9943e0762e1589e37c3653c3812967f303225277.zip
* Update some more modules.
svn path=/nixos/trunk/; revision=17763
Diffstat (limited to 'modules/services/networking/ifplugd.nix')
-rw-r--r--modules/services/networking/ifplugd.nix26
1 files changed, 13 insertions, 13 deletions
diff --git a/modules/services/networking/ifplugd.nix b/modules/services/networking/ifplugd.nix
index 9a08bba05e5b..021e7f8fecf6 100644
--- a/modules/services/networking/ifplugd.nix
+++ b/modules/services/networking/ifplugd.nix
@@ -1,7 +1,8 @@
 {pkgs, config, ...}:
 
+with pkgs.lib;
+
 let
-  inherit (pkgs.lib) mkOption mkIf;
 
   inherit (pkgs) ifplugd;
 
@@ -54,20 +55,19 @@ in
 
   config = mkIf config.networking.interfaceMonitor.enable {
 
-    jobs = pkgs.lib.singleton {
-      name = "ifplugd";
-
-      job = ''
-        description "Network interface connectivity monitor"
+    jobAttrs.ifplugd =
+      { description = "Network interface connectivity monitor";
 
-        start on network-interfaces/started
-        stop on network-interfaces/stop
+        startOn = "network-interfaces/started";
+        stopOn = "network-interfaces/stop";
 
-        respawn ${ifplugd}/sbin/ifplugd --no-daemon --no-startup --no-shutdown \
-            ${if config.networking.interfaceMonitor.beep then "" else "--no-beep"} \
-            --run ${plugScript}
-      '';
-    };
+        exec =
+          ''
+            ${ifplugd}/sbin/ifplugd --no-daemon --no-startup --no-shutdown \
+              ${if config.networking.interfaceMonitor.beep then "" else "--no-beep"} \
+              --run ${plugScript}
+          '';
+      };
 
     environment.systemPackages = [ifplugd];