- fix indention, clarify parameter descriptions, and use 'exec' instead of 'script' in the hostapd job

This commit is contained in:
Jack Cummings 2012-10-09 12:19:09 -07:00
parent 33754edb3e
commit 71e6eca567

View File

@ -52,7 +52,7 @@ in
enable = mkOption { enable = mkOption {
default = false; default = false;
description = '' description = ''
enable putting a wireless interface into infrastructure mode, Enable putting a wireless interface into infrastructure mode,
allowing other wireless devices to associate with the wireless interface and do allowing other wireless devices to associate with the wireless interface and do
wireless networking. A simple access point will enable hostapd.wpa, and wireless networking. A simple access point will enable hostapd.wpa, and
hostapd.wpa_passphrase, hostapd.ssid, dhcpd on the wireless interface to hostapd.wpa_passphrase, hostapd.ssid, dhcpd on the wireless interface to
@ -107,19 +107,24 @@ in
example = "network"; example = "network";
type = types.string; type = types.string;
description = "members of this group can control hostapd"; description = "members of this group can control hostapd";
}; };
wpa = mkOption { wpa = mkOption {
default = true; default = true;
description = "enable WPA (IEEE 802.11i/D3.0) to authenticate to the access point"; description = "enable WPA (IEEE 802.11i/D3.0) to authenticate to the access point";
}; };
wpaPassphrase = mkOption { wpaPassphrase = mkOption {
default = "my_sekret"; default = "my_sekret";
example = "any_64_char_string"; example = "any_64_char_string";
type = types.string; type = types.string;
description = "WPA-PSK (pre-shared-key) passphrase. Clients will need this passphrase to associate with this access point"; description =
}; ''
WPA-PSK (pre-shared-key) passphrase. Clients will need this
passphrase to associate with this access point. Warning: This passphrase will
get put into a world-readable file in the nix store.
'';
};
extraCfg = mkOption { extraCfg = mkOption {
default = ""; default = "";
@ -130,9 +135,9 @@ in
''; '';
type = types.string; type = types.string;
description = "Extra configuration options to put in the hostapd.conf"; description = "Extra configuration options to put in the hostapd.conf";
};
}; };
}; };
};
###### implementation ###### implementation
@ -144,11 +149,7 @@ in
jobs.hostapd = jobs.hostapd =
{ startOn = "started network-interfaces"; { startOn = "started network-interfaces";
stopOn = "stopping network-interfaces"; stopOn = "stopping network-interfaces";
exec = "${pkgs.hostapd}/bin/hostapd ${configFile}";
script =
''
exec ${pkgs.hostapd}/bin/hostapd ${configFile}
'';
}; };
}; };
} }