Added Fixed Wireguard ips to hosts dns lookup

This commit is contained in:
2026-06-29 18:13:11 +02:00
parent 73ff128705
commit 6668c810d3
5 changed files with 38 additions and 12 deletions
+17 -1
View File
@@ -1,6 +1,7 @@
{
pkgs,
primaryUser,
lib,
...
}:
{
@@ -51,6 +52,12 @@
info.enable = false; # Skip info pages
};
# Mirrored Network conf
networking.knownNetworkServices = [
"Wi-Fi"
"Ethernet"
];
# homebrew installation manager
nix-homebrew = {
user = primaryUser;
@@ -60,15 +67,24 @@
# macOS-specific settings
programs.fish.enable = true;
environment.shells = [ pkgs.fish ];
system.primaryUser = primaryUser;
users.users.${primaryUser} = {
home = "/Users/${primaryUser}";
shell = pkgs.fish;
openssh.authorizedKeys.keyFiles = [ ../secrets/ssh-key ];
};
environment = {
shells = [ pkgs.fish ];
systemPath = [ "/opt/homebrew/bin" ];
pathsToLink = [ "/Applications" ];
etc."hosts".text = lib.mkAfter ''
10.10.0.1 proxy.cyperpunk.de
10.10.0.2 controller.cyperpunk.de
10.10.0.3 mac.cyperpunk.de
10.10.0.30 node1.cyperpunk.de
10.10.0.31 node2.cyperpunk.de
10.10.0.40 desktop.cyperpunk.de
'';
};
}
+2 -2
View File
@@ -5,7 +5,7 @@
...
}:
{
sops.secrets."wireguard/${hostName}" = {
sops.secrets."network/wireguard/${hostName}" = {
mode = "0400";
};
@@ -13,7 +13,7 @@
script = ''
set -e
mkdir -p /etc/wireguard
PRIVATE_KEY=$(cat ${config.sops.secrets."wireguard/${hostName}".path})
PRIVATE_KEY=$(cat ${config.sops.secrets."network/wireguard/${hostName}".path})
cat > /etc/wireguard/wg0.conf << EOF
[Interface]
Address = $WG_IP