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/filesystems.nix) # Mount file systems.
|
||||||
|
|
||||||
(import ../upstart-jobs/swap.nix)
|
(import ../upstart-jobs/swap.nix)
|
||||||
|
(import ../upstart-jobs/network-interfaces.nix)
|
||||||
|
|
||||||
|
|
||||||
# security
|
# security
|
||||||
|
@ -71,12 +71,6 @@ let
|
|||||||
jobs = map makeJob
|
jobs = map makeJob
|
||||||
([
|
([
|
||||||
|
|
||||||
# Network interfaces.
|
|
||||||
(import ../upstart-jobs/network-interfaces.nix {
|
|
||||||
inherit modprobe config;
|
|
||||||
inherit (pkgs) nettools wirelesstools bash writeText;
|
|
||||||
})
|
|
||||||
|
|
||||||
# Name service cache daemon.
|
# Name service cache daemon.
|
||||||
(import ../upstart-jobs/nscd.nix {
|
(import ../upstart-jobs/nscd.nix {
|
||||||
inherit (pkgs) glibc;
|
inherit (pkgs) glibc;
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
{nettools, modprobe, wirelesstools, bash, writeText, config}:
|
{pkgs, config, ...}:
|
||||||
|
|
||||||
|
###### implementation
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
|
inherit (pkgs) nettools wirelesstools bash writeText;
|
||||||
|
|
||||||
cfg = config.networking;
|
cfg = config.networking;
|
||||||
|
|
||||||
# !!! use XML
|
# !!! use XML
|
||||||
@ -10,10 +14,14 @@ let
|
|||||||
subnetMasks = map (i: if i ? subnetMask then i.subnetMask else "default") cfg.interfaces;
|
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;
|
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;
|
wepKeys = map (i: if i ? wepKey then i.wepKey else "nokey") cfg.interfaces;
|
||||||
|
modprobe = config.system.sbin.modprobe;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
services = {
|
||||||
|
extraJobs = [{
|
||||||
name = "network-interfaces";
|
name = "network-interfaces";
|
||||||
|
|
||||||
job = ''
|
job = ''
|
||||||
@ -96,5 +104,6 @@ in
|
|||||||
done
|
done
|
||||||
end script
|
end script
|
||||||
'';
|
'';
|
||||||
|
}];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user