home/modules/captive-browser: linux DHCP command, default option priority
let's just hardcode dhcpcd under Linux. untested.
This commit is contained in:
parent
18adff4c52
commit
9f43d64f49
1 changed files with 6 additions and 2 deletions
|
@ -56,11 +56,15 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.packages = [ cfg.package ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
programs.captive-browser.settings = {
|
programs.captive-browser.settings = builtins.mapAttrs (_: lib.mkOptionDefault) {
|
||||||
# dhcp-dns is the shell (/bin/sh) command executed to obtain the DHCP
|
# dhcp-dns is the shell (/bin/sh) command executed to obtain the DHCP
|
||||||
# DNS server address. The first match of an IPv4 regex is used.
|
# DNS server address. The first match of an IPv4 regex is used.
|
||||||
# IPv4 only, because let's be real, it's a captive portal.
|
# IPv4 only, because let's be real, it's a captive portal.
|
||||||
dhcp-dns = "ipconfig getoption ${cfg.interface} domain_name_server";
|
dhcp-dns =
|
||||||
|
if isDarwin then
|
||||||
|
"ipconfig getoption ${cfg.interface} domain_name_server"
|
||||||
|
else
|
||||||
|
"${lib.getExe pkgs.dhcpcd} -U ${cfg.interface} | grep domain_name_servers";
|
||||||
|
|
||||||
# socks5-addr is the listen address for the SOCKS5 proxy server.
|
# socks5-addr is the listen address for the SOCKS5 proxy server.
|
||||||
socks5-addr = "localhost:1666";
|
socks5-addr = "localhost:1666";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue