add a setting to fall back to default dns for public wifi

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
ahuston-0 2025-05-26 14:38:40 -04:00
parent d868d3dbfc
commit 04a3417edd
No known key found for this signature in database
GPG Key ID: 47940175096C1330
2 changed files with 27 additions and 20 deletions

View File

@ -1,7 +1,8 @@
{ config, ... }:
{ config, lib, ... }:
let
always = 100;
home = 99;
public_wifi = false;
in
{
networking.wireless = {
@ -24,29 +25,13 @@ in
"24HuFios".pskRaw = "ext:PASS_longboat_home";
"Verizon_ZLHQ3H".pskRaw = "ext:PASS_angie";
"Fios-Qn3RB".pskRaw = "ext:PASS_parkridge";
"optimumwifi" = { };
"CableWiFi" = { };
#"optimumwifi" = { };
#"CableWiFi" = { };
"JPMCVisitor" = { };
#"Hilton Honors" = { };
};
};
networking.nameservers = [
"9.9.9.9"
"1.1.1.1"
"192.168.76.1"
];
services.resolved = {
enable = true;
dnssec = "true";
domains = [ "~." ];
fallbackDns = [
"1.1.1.1#one.one.one.one"
"1.0.0.1#one.one.one.one"
];
dnsovertls = "true";
};
sops = {
defaultSopsFile = ./secrets.yaml;
secrets = {
@ -57,3 +42,24 @@ in
};
};
}
//
lib.mkIf (!public_wifi) {
networking.nameservers = [
"9.9.9.9"
"1.1.1.1"
"192.168.76.1"
];
services.resolved = {
enable = true;
dnssec = "false";
domains = [ "~." ];
fallbackDns = [
"1.1.1.1#one.one.one.one"
"1.0.0.1#one.one.one.one"
];
dnsovertls = "true";
};
}

View File

@ -3,6 +3,7 @@
{
programs.git = {
enable = true;
lfs.enable = true;
signing = {
key = "5EFFB75F7C9B74EAA5C4637547940175096C1330";
signByDefault = true;