Skip to content

Commit

Permalink
networking: Add DNS via unbound
Browse files Browse the repository at this point in the history
  • Loading branch information
TLATER authored and tlater-famedly committed Mar 13, 2024
1 parent e3dc5dc commit fa4aac7
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 11 deletions.
10 changes: 2 additions & 8 deletions nixos-config/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
flake-inputs.sops-nix.nixosModules.sops

./greeter
./networking
./sway.nix
./yubikey.nix
../modules
Expand Down Expand Up @@ -79,22 +80,15 @@
};
};

networking = {
useDHCP = false;
networkmanager.enable = true;
};

time.timeZone = "Europe/Amsterdam";

users = {
defaultUserShell = pkgs.zsh;

groups.network = {};

users = {
tlater = {
isNormalUser = true;
extraGroups = ["wheel" "video" "network"];
extraGroups = ["wheel" "video"];
};
};
};
Expand Down
2 changes: 1 addition & 1 deletion nixos-config/hosts/ren/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
./hardware-configuration.nix
./nixos-hardware-precursor.nix
./disko.nix
../../networks/personal.nix
../../networking/personal.nix
../../wireguard.nix
];

Expand Down
2 changes: 1 addition & 1 deletion nixos-config/hosts/rin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}: {
imports = [
flake-inputs.disko.nixosModules.disko
../../networks/work.nix
../../networking/work.nix

./hardware-configuration.nix
./disko.nix
Expand Down
2 changes: 1 addition & 1 deletion nixos-config/hosts/yui/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ in {

./games.nix
./hardware-configuration.nix
../../networks/personal.nix
../../networking/personal.nix
./wireguard.nix
../../wireguard.nix
./nvidia
Expand Down
33 changes: 33 additions & 0 deletions nixos-config/networking/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
users.users.tlater.extraGroups = ["networking"];

networking = {
useDHCP = false;
networkmanager.enable = true;
};

services.unbound = {
enable = true;

settings = {
server = {
qname-minimisation = true;
};

forward-zone = [
{
# ProtonVPN DNS, if available
name = ".";
forward-addr = "10.2.0.1";
}
{
# Cloudflare backup
name = ".";
forward-addr = "1.1.1.1";
}
];
};

localControlSocketPath = "/run/unbound/unbound.ctl";
};
}
File renamed without changes.
File renamed without changes.

0 comments on commit fa4aac7

Please sign in to comment.