summary refs log tree commit diff
path: root/nixos/modules/services/networking/bind.nix
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2016-01-06 06:50:18 +0000
committerRobin Gloster <mail@glob.in>2016-01-07 06:39:06 +0000
commit88292fdf09960e9cb8e3c063a6b95ac4284222ec (patch)
tree34ff267ed7bacf9fd906b1736476b431e9afe909 /nixos/modules/services/networking/bind.nix
parentaf50b03f50d88954e98018c7c18c0581928b7165 (diff)
downloadnixpkgs-88292fdf09960e9cb8e3c063a6b95ac4284222ec.tar
nixpkgs-88292fdf09960e9cb8e3c063a6b95ac4284222ec.tar.gz
nixpkgs-88292fdf09960e9cb8e3c063a6b95ac4284222ec.tar.bz2
nixpkgs-88292fdf09960e9cb8e3c063a6b95ac4284222ec.tar.lz
nixpkgs-88292fdf09960e9cb8e3c063a6b95ac4284222ec.tar.xz
nixpkgs-88292fdf09960e9cb8e3c063a6b95ac4284222ec.tar.zst
nixpkgs-88292fdf09960e9cb8e3c063a6b95ac4284222ec.zip
jobs -> systemd.services
Diffstat (limited to 'nixos/modules/services/networking/bind.nix')
-rw-r--r--nixos/modules/services/networking/bind.nix23
1 files changed, 10 insertions, 13 deletions
diff --git a/nixos/modules/services/networking/bind.nix b/nixos/modules/services/networking/bind.nix
index 34e7470dfc6..dc11524ffeb 100644
--- a/nixos/modules/services/networking/bind.nix
+++ b/nixos/modules/services/networking/bind.nix
@@ -142,20 +142,17 @@ in
         description = "BIND daemon user";
       };
 
-    jobs.bind =
-      { description = "BIND name server job";
+    systemd.services.bind = {
+      description = "BIND name server job";
+      after = [ "network-interfaces.target" ];
+      wantedBy = [ "multi-user.target" ];
 
-        startOn = "started network-interfaces";
-
-        preStart =
-          ''
-            ${pkgs.coreutils}/bin/mkdir -p /var/run/named
-            chown ${bindUser} /var/run/named
-          '';
-
-        exec = "${pkgs.bind}/sbin/named -u ${bindUser} ${optionalString cfg.ipv4Only "-4"} -c ${cfg.configFile} -f";
-      };
+      preStart = ''
+        ${pkgs.coreutils}/bin/mkdir -p /var/run/named
+        chown ${bindUser} /var/run/named
+      '';
 
+      script = "${pkgs.bind}/sbin/named -u ${bindUser} ${optionalString cfg.ipv4Only "-4"} -c ${cfg.configFile} -f";
+    };
   };
-
 }