Added Fixed Wireguard ips to hosts dns lookup
This commit is contained in:
+17
-1
@@ -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
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user