Author: mkwik
Date: Sun Mar  4 12:58:18 2012
New Revision: 32766
URL: https://nixos.org/websvn/nix/?rev=32766&sc=1

Log:
many daemons: depend on all-interfaces instead of gw6c

Modified:
   nixos/trunk/modules/services/mail/dovecot.nix
   nixos/trunk/modules/services/mail/dovecot2.nix
   nixos/trunk/modules/services/mail/postfix.nix
   nixos/trunk/modules/services/networking/bind.nix
   nixos/trunk/modules/services/networking/ircd-hybrid/control.in
   nixos/trunk/modules/services/networking/ircd-hybrid/default.nix
   nixos/trunk/modules/services/networking/openfire.nix
   nixos/trunk/modules/services/web-servers/apache-httpd/default.nix
   nixos/trunk/modules/services/x11/xfs.nix

Modified: nixos/trunk/modules/services/mail/dovecot.nix
==============================================================================
--- nixos/trunk/modules/services/mail/dovecot.nix       Sun Mar  4 12:58:14 
2012        (r32765)
+++ nixos/trunk/modules/services/mail/dovecot.nix       Sun Mar  4 12:58:18 
2012        (r32766)
@@ -4,8 +4,6 @@
 
 let
 
-  startingDependency = if config.services.gw6c.enable then "gw6c" else 
"network-interfaces";
-
   cfg = config.services.dovecot;
 
   dovecotConf =
@@ -116,7 +114,7 @@
     jobs.dovecot =
       { description = "Dovecot IMAP/POP3 server";
 
-        startOn = "started ${startingDependency}";
+        startOn = "started all-interfaces";
 
         preStart =
           ''

Modified: nixos/trunk/modules/services/mail/dovecot2.nix
==============================================================================
--- nixos/trunk/modules/services/mail/dovecot2.nix      Sun Mar  4 12:58:14 
2012        (r32765)
+++ nixos/trunk/modules/services/mail/dovecot2.nix      Sun Mar  4 12:58:18 
2012        (r32766)
@@ -4,8 +4,6 @@
 
 let
 
-  startingDependency = if config.services.gw6c.enable then "gw6c" else 
"network-interfaces";
-
   cfg = config.services.dovecot2;
 
   dovecotConf =
@@ -125,7 +123,7 @@
     jobs.dovecot2 =
       { description = "Dovecot IMAP/POP3 server";
 
-        startOn = "started ${startingDependency}";
+        startOn = "started all-interfaces";
 
         preStart =
           ''

Modified: nixos/trunk/modules/services/mail/postfix.nix
==============================================================================
--- nixos/trunk/modules/services/mail/postfix.nix       Sun Mar  4 12:58:14 
2012        (r32765)
+++ nixos/trunk/modules/services/mail/postfix.nix       Sun Mar  4 12:58:18 
2012        (r32766)
@@ -4,8 +4,6 @@
 
 let
 
-  startingDependency = if config.services.gw6c.enable then "gw6c" else 
"network-interfaces";
-
   cfg = config.services.postfix;
   user = cfg.user;
   group = cfg.group;
@@ -21,9 +19,7 @@
       default_privs = nobody
 
     ''
-    + optionalString (config.services.gw6c.enable || 
config.networking.enableIPv6) (''
-      inet_protocols = all
-    '')
+    + optionalString config.networking.enableIPv6 "inet_protocols = all"
     + (if cfg.networks != null then
         ''
           mynetworks = ${concatStringsSep ", " cfg.networks}
@@ -309,7 +305,7 @@
       # accurate way is unlikely to be better.
       { description = "Postfix mail server";
 
-        startOn = "started ${startingDependency}";
+        startOn = "started all-interfaces";
 
         daemonType = "none";
 

Modified: nixos/trunk/modules/services/networking/bind.nix
==============================================================================
--- nixos/trunk/modules/services/networking/bind.nix    Sun Mar  4 12:58:14 
2012        (r32765)
+++ nixos/trunk/modules/services/networking/bind.nix    Sun Mar  4 12:58:18 
2012        (r32766)
@@ -4,8 +4,6 @@
 
 let
 
-  startingDependency = if config.services.gw6c.enable then "gw6c" else 
"network-interfaces";
-
   cfg = config.services.bind;
 
   confFile = pkgs.writeText "named.conf"

Modified: nixos/trunk/modules/services/networking/ircd-hybrid/control.in
==============================================================================
--- nixos/trunk/modules/services/networking/ircd-hybrid/control.in      Sun Mar 
 4 12:58:14 2012        (r32765)
+++ nixos/trunk/modules/services/networking/ircd-hybrid/control.in      Sun Mar 
 4 12:58:18 2012        (r32766)
@@ -5,7 +5,7 @@
 
 if test "$1" = "start"; then
        if ! @procps@/bin/pgrep ircd; then
-       if @gw6cEnabled@; then 
+       if @ipv6Enabled@; then 
                while ! @iproute@/sbin/ip addr | 
                        @gnugrep@/bin/grep inet6 | 
                        @gnugrep@/bin/grep global; do

Modified: nixos/trunk/modules/services/networking/ircd-hybrid/default.nix
==============================================================================
--- nixos/trunk/modules/services/networking/ircd-hybrid/default.nix     Sun Mar 
 4 12:58:14 2012        (r32765)
+++ nixos/trunk/modules/services/networking/ircd-hybrid/default.nix     Sun Mar 
 4 12:58:18 2012        (r32766)
@@ -12,7 +12,7 @@
     substFiles = [ "=>/conf" ./ircd.conf ];
     inherit (pkgs) ircdHybrid coreutils su iproute gnugrep procps;
 
-    gw6cEnabled = if config.services.gw6c.enable && 
config.services.gw6c.autorun then "true" else "false";
+    ipv6Enabled = if config.networking.enableIPv6 then "true" else "false";
 
     inherit (cfg) serverName sid description adminEmail
             extraPort;
@@ -26,8 +26,6 @@
     builder = ./builder.sh;
   };
 
-  startingDependency = if config.services.gw6c.enable then "gw6c" else 
"network-interfaces";
-
 in
 
 {
@@ -127,8 +125,8 @@
 
         description = "IRCD Hybrid server";
 
-        startOn = "started ${startingDependency}";
-        stopOn = "stopping ${startingDependency}";
+        startOn = "started all-interfaces";
+        stopOn = "stopping all-interfaces";
 
         exec = "${ircdService}/bin/control start";
       };

Modified: nixos/trunk/modules/services/networking/openfire.nix
==============================================================================
--- nixos/trunk/modules/services/networking/openfire.nix        Sun Mar  4 
12:58:14 2012        (r32765)
+++ nixos/trunk/modules/services/networking/openfire.nix        Sun Mar  4 
12:58:18 2012        (r32766)
@@ -6,10 +6,8 @@
 
   inherit (pkgs) jre openfire coreutils which gnugrep gawk gnused;
 
-  startDependency =
-    if config.services.openfire.usePostgreSQL then "postgresql" else
-    if config.services.gw6c.enable then "gw6c" else
-    "network-interfaces";
+  extraStartDependency =
+    if config.services.openfire.usePostgreSQL then "and started postgresql" 
else "";
 
 in
 
@@ -50,7 +48,7 @@
     jobs.openfire =
       { description = "OpenFire XMPP server";
 
-        startOn = "started ${startDependency}";
+        startOn = "started all-interfaces ${extraStartDependency}";
 
         script =
           ''

Modified: nixos/trunk/modules/services/web-servers/apache-httpd/default.nix
==============================================================================
--- nixos/trunk/modules/services/web-servers/apache-httpd/default.nix   Sun Mar 
 4 12:58:14 2012        (r32765)
+++ nixos/trunk/modules/services/web-servers/apache-httpd/default.nix   Sun Mar 
 4 12:58:18 2012        (r32766)
@@ -6,8 +6,6 @@
 
   mainCfg = config.services.httpd;
 
-  startingDependency = if config.services.gw6c.enable then "gw6c" else 
"network-interfaces";
-
   httpd = pkgs.apacheHttpd;
 
   getPort = cfg: if cfg.port != 0 then cfg.port else if cfg.enableSSL then 443 
else 80;
@@ -555,7 +553,7 @@
 
         description = "Apache HTTPD";
 
-        startOn = "started ${startingDependency} and filesystem"
+        startOn = "started all-interfaces and filesystem"
           # Hacky.  Some subservices depend on Postgres
           # (e.g. Mediawiki), but they don't have a way to declare
           # that dependency.  So just start httpd after postgresql if

Modified: nixos/trunk/modules/services/x11/xfs.nix
==============================================================================
--- nixos/trunk/modules/services/x11/xfs.nix    Sun Mar  4 12:58:14 2012        
(r32765)
+++ nixos/trunk/modules/services/x11/xfs.nix    Sun Mar  4 12:58:18 2012        
(r32766)
@@ -6,11 +6,6 @@
 
   configFile = ./xfs.conf;
 
-  startingDependency =
-    if config.services.gw6c.enable && config.services.gw6c.autorun
-    then "gw6c"
-    else "network-interfaces";
-
 in
 
 {
@@ -41,7 +36,7 @@
     jobs.xfs =
       { description = "X Font Server";
 
-        startOn = "started ${startingDependency}";
+        startOn = "started all-interfaces";
 
         exec = "${pkgs.xorg.xfs}/bin/xfs -config ${configFile}";
       };
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to