Convert "nework-interfaces"
svn path=/nixos/branches/fix-style/; revision=14403
This commit is contained in:
parent
ed8bfc1c78
commit
4963abf63e
@ -423,6 +423,7 @@ in
|
||||
(import ../upstart-jobs/filesystems.nix) # Mount file systems.
|
||||
|
||||
(import ../upstart-jobs/swap.nix)
|
||||
(import ../upstart-jobs/network-interfaces.nix)
|
||||
|
||||
|
||||
# security
|
||||
|
@ -71,12 +71,6 @@ let
|
||||
jobs = map makeJob
|
||||
([
|
||||
|
||||
# Network interfaces.
|
||||
(import ../upstart-jobs/network-interfaces.nix {
|
||||
inherit modprobe config;
|
||||
inherit (pkgs) nettools wirelesstools bash writeText;
|
||||
})
|
||||
|
||||
# Name service cache daemon.
|
||||
(import ../upstart-jobs/nscd.nix {
|
||||
inherit (pkgs) glibc;
|
||||
|
@ -1,7 +1,11 @@
|
||||
{nettools, modprobe, wirelesstools, bash, writeText, config}:
|
||||
{pkgs, config, ...}:
|
||||
|
||||
###### implementation
|
||||
|
||||
let
|
||||
|
||||
inherit (pkgs) nettools wirelesstools bash writeText;
|
||||
|
||||
cfg = config.networking;
|
||||
|
||||
# !!! use XML
|
||||
@ -10,10 +14,14 @@ let
|
||||
subnetMasks = map (i: if i ? subnetMask then i.subnetMask else "default") cfg.interfaces;
|
||||
essids = map (i: if i ? essid then i.essid else "default") cfg.interfaces;
|
||||
wepKeys = map (i: if i ? wepKey then i.wepKey else "nokey") cfg.interfaces;
|
||||
modprobe = config.system.sbin.modprobe;
|
||||
|
||||
in
|
||||
|
||||
|
||||
{
|
||||
services = {
|
||||
extraJobs = [{
|
||||
name = "network-interfaces";
|
||||
|
||||
job = ''
|
||||
@ -96,5 +104,6 @@ in
|
||||
done
|
||||
end script
|
||||
'';
|
||||
|
||||
}];
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user