changed the way networking-providers plug themselves before "networking"
svn path=/nixos/trunk/; revision=32781
This commit is contained in:
parent
8bfe513e75
commit
7d964498b8
@ -58,15 +58,12 @@ in
|
|||||||
|
|
||||||
# environment.systemPackages = [pkgs.gogoclient];
|
# environment.systemPackages = [pkgs.gogoclient];
|
||||||
|
|
||||||
networking = {
|
networking.enableIPv6 = true;
|
||||||
enableIPv6 = true;
|
|
||||||
interfaceJobs = optional cfg.autorun config.jobs.gogoclient;
|
|
||||||
};
|
|
||||||
|
|
||||||
jobs.gogoclient = {
|
jobs.gogoclient = {
|
||||||
name = "gogoclient";
|
name = "gogoclient";
|
||||||
description = "ipv6 tunnel";
|
description = "ipv6 tunnel";
|
||||||
startOn = if cfg.autorun then "started network-interfaces" else "";
|
startOn = optionalString cfg.autorun "starting networking";
|
||||||
stopOn = "stopping network-interfaces";
|
stopOn = "stopping network-interfaces";
|
||||||
script = "cd /var/lib/gogoc; exec gogoc -y -f /etc/gogoc.conf";
|
script = "cd /var/lib/gogoc; exec gogoc -y -f /etc/gogoc.conf";
|
||||||
path = [pkgs.gogoclient];
|
path = [pkgs.gogoclient];
|
||||||
|
@ -150,16 +150,13 @@ in
|
|||||||
jobs.gw6c =
|
jobs.gw6c =
|
||||||
{ description = "Gateway6 client";
|
{ description = "Gateway6 client";
|
||||||
|
|
||||||
startOn = if cfg.autorun then "started network-interfaces" else "";
|
startOn = optionalString cfg.autorun "starting networking";
|
||||||
stopOn = "stopping network-interfaces";
|
stopOn = "stopping network-interfaces";
|
||||||
|
|
||||||
exec = "${gw6cService}/bin/control start";
|
exec = "${gw6cService}/bin/control start";
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking.enableIPv6 = true;
|
||||||
enableIPv6 = true;
|
|
||||||
interfaceJobs = optional cfg.autorun config.jobs.gw6c;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -172,17 +172,6 @@ in
|
|||||||
configured.
|
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 = {
|
jobs.networking = {
|
||||||
name = "networking";
|
name = "networking";
|
||||||
description = "all required interfaces are up";
|
description = "all required interfaces are up";
|
||||||
startOn = concatStringsSep " and " (map (job: "started ${job.name}") cfg.interfaceJobs);
|
startOn = "started network-interfaces";
|
||||||
stopOn = concatStringsSep " and " (map (job: "stopping ${job.name}") cfg.interfaceJobs);
|
stopOn = "stopping network-interfaces";
|
||||||
task = true;
|
task = true;
|
||||||
exec = "true";
|
exec = "true";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
networking.interfaceJobs = [config.jobs.networkInterfaces];
|
|
||||||
|
|
||||||
|
|
||||||
# Set the host name in the activation script. Don't clear it if
|
# Set the host name in the activation script. Don't clear it if
|
||||||
# it's not configured in the NixOS configuration, since it may
|
# it's not configured in the NixOS configuration, since it may
|
||||||
# have been set by dhclient in the meantime.
|
# have been set by dhclient in the meantime.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user