From 7d964498b8ec87c9fafaddbee1dd3508a334493f Mon Sep 17 00:00:00 2001 From: Mathijs Kwik <mathijs@bluescreen303.nl> Date: Sun, 4 Mar 2012 18:44:47 +0000 Subject: [PATCH] changed the way networking-providers plug themselves before "networking" svn path=/nixos/trunk/; revision=32781 --- modules/services/networking/gogoclient.nix | 7 ++----- modules/services/networking/gw6c/default.nix | 7 ++----- modules/tasks/network-interfaces.nix | 19 ++----------------- 3 files changed, 6 insertions(+), 27 deletions(-) diff --git a/modules/services/networking/gogoclient.nix b/modules/services/networking/gogoclient.nix index 19d3f5dd7559..12fbef1f3ba9 100644 --- a/modules/services/networking/gogoclient.nix +++ b/modules/services/networking/gogoclient.nix @@ -58,15 +58,12 @@ in # environment.systemPackages = [pkgs.gogoclient]; - networking = { - enableIPv6 = true; - interfaceJobs = optional cfg.autorun config.jobs.gogoclient; - }; + networking.enableIPv6 = true; jobs.gogoclient = { name = "gogoclient"; description = "ipv6 tunnel"; - startOn = if cfg.autorun then "started network-interfaces" else ""; + startOn = optionalString cfg.autorun "starting networking"; stopOn = "stopping network-interfaces"; script = "cd /var/lib/gogoc; exec gogoc -y -f /etc/gogoc.conf"; path = [pkgs.gogoclient]; diff --git a/modules/services/networking/gw6c/default.nix b/modules/services/networking/gw6c/default.nix index 93b6924971e7..8471a0c756ad 100644 --- a/modules/services/networking/gw6c/default.nix +++ b/modules/services/networking/gw6c/default.nix @@ -150,16 +150,13 @@ in jobs.gw6c = { description = "Gateway6 client"; - startOn = if cfg.autorun then "started network-interfaces" else ""; + startOn = optionalString cfg.autorun "starting networking"; stopOn = "stopping network-interfaces"; exec = "${gw6cService}/bin/control start"; }; - networking = { - enableIPv6 = true; - interfaceJobs = optional cfg.autorun config.jobs.gw6c; - }; + networking.enableIPv6 = true; }; diff --git a/modules/tasks/network-interfaces.nix b/modules/tasks/network-interfaces.nix index fc8ebcddca4d..866c34b86fe8 100644 --- a/modules/tasks/network-interfaces.nix +++ b/modules/tasks/network-interfaces.nix @@ -172,17 +172,6 @@ in configured. ''; }; - - networking.interfaceJobs = mkOption { - default = [config.jobs.networkInterfaces]; - type = types.list types.attrs; - merge = mergeListOption; - description = '' - List of jobs that bring up additional interfaces. - For example vpn / ipv6 / ppp tasks. - This gets used by certain services as dependency for their upstart job. - ''; - }; }; @@ -286,16 +275,12 @@ in jobs.networking = { name = "networking"; description = "all required interfaces are up"; - startOn = concatStringsSep " and " (map (job: "started ${job.name}") cfg.interfaceJobs); - stopOn = concatStringsSep " and " (map (job: "stopping ${job.name}") cfg.interfaceJobs); + startOn = "started network-interfaces"; + stopOn = "stopping network-interfaces"; task = true; exec = "true"; }; - - networking.interfaceJobs = [config.jobs.networkInterfaces]; - - # Set the host name in the activation script. Don't clear it if # it's not configured in the NixOS configuration, since it may # have been set by dhclient in the meantime.