get working wireguard on work
This commit is contained in:
		
							parent
							
								
									e5eef474c6
								
							
						
					
					
						commit
						629b8eb49e
					
				|  | @ -14,24 +14,6 @@ | ||||||
|   home.homeDirectory = "/Users/anishlakhwara"; |   home.homeDirectory = "/Users/anishlakhwara"; | ||||||
|   home.stateVersion = "22.05"; |   home.stateVersion = "22.05"; | ||||||
| 
 | 
 | ||||||
|   # networking.wg-quick.interfaces = { |  | ||||||
|   #   wg0 = { |  | ||||||
|   #     address = [ "10.0.69.7/24" ]; |  | ||||||
|   #     listenPort = 60990; # to match firewall allowedUDPPorts (without this wg uses random port numbers) |  | ||||||
|   #     privateKeyFile = "/run/agenix/work-wg"; |  | ||||||
|   #     peers = [ |  | ||||||
|   #       # For a client configuration, one peer entry for the server will suffice. |  | ||||||
|   #       { |  | ||||||
|   #         publicKey = "c1J4p63rD3IlszugMZiki7UBV3YmDdqa3DU4UejXzAI="; |  | ||||||
|   #         allowedIPs = [ "10.0.69.0/24" ]; |  | ||||||
|   #         # Set this to the server IP and port. |  | ||||||
|   #         endpoint = "sealight.xyz:60990"; # TODO: route to endpoint not automatically configured https://wiki.archlinux.org/index.php/WireGuard#Loop_routing https://discourse.nixos.org/t/solved-minimal-firewall-setup-for-wireguard-client/7577 |  | ||||||
|   #         persistentKeepalive = 25; |  | ||||||
|   #       } |  | ||||||
|   #     ]; |  | ||||||
|   #   }; |  | ||||||
|   # }; |  | ||||||
| 
 |  | ||||||
|   programs.zsh.initExtra = '' |   programs.zsh.initExtra = '' | ||||||
|     PATH=/Users/anishlakhwara/.sourcegraph/bin:/Users/anishlakhwara/.sourcegraph/sg.zsh_autocomplete:/Users/anishlakhwara/google-cloud-sdk/bin:/Users/anishlakhwara/google-cloud-sdk/completion.zsh.inc:/Users/anishlakhwara/google-cloud-sdk/path.zsh.inc:/Users/anishlakhwara/.sg:/opt/homebrew/bin:$PATH |     PATH=/Users/anishlakhwara/.sourcegraph/bin:/Users/anishlakhwara/.sourcegraph/sg.zsh_autocomplete:/Users/anishlakhwara/google-cloud-sdk/bin:/Users/anishlakhwara/google-cloud-sdk/completion.zsh.inc:/Users/anishlakhwara/google-cloud-sdk/path.zsh.inc:/Users/anishlakhwara/.sg:/opt/homebrew/bin:$PATH | ||||||
|     ''; |     ''; | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| { self, pkgs, ... }: | { self, pkgs, config, ... }: | ||||||
| 
 | 
 | ||||||
| { | { | ||||||
|   imports = [ |   imports = [ | ||||||
|  | @ -18,25 +18,27 @@ | ||||||
|     pkgs.kubernetes-helm |     pkgs.kubernetes-helm | ||||||
|   ]; |   ]; | ||||||
| 
 | 
 | ||||||
|   # age.secrets.curve-wg.file = "${self}/secrets/work-wg.age"; |   age.identityPaths = [ "/Users/anishlakhwara/.ssh/id_ed25519" ]; | ||||||
|   # age.secrets.curve-wg.owner = "anishlakhwara"; |   age.secrets.work-wg.file = "${self}/secrets/work-wg.age"; | ||||||
|   # networking.wg-quick.interfaces = { |   age.secrets.work-wg.owner = "anishlakhwara"; | ||||||
|   #   wg0 = { |   networking.wg-quick.interfaces = { | ||||||
|   #     address = [ "10.0.69.7/24" ]; |     wg0 = { | ||||||
|   #     listenPort = 60990; # to match firewall allowedUDPPorts (without this wg uses random port numbers) |       address = [ "10.0.69.7/24" ]; | ||||||
|   #     privateKeyFile = "/run/agenix/work-wg"; |       listenPort = 60990; # to match firewall allowedUDPPorts (without this wg uses random port numbers) | ||||||
|   #     peers = [ |       privateKeyFile = config.age.secrets.work-wg.path; | ||||||
|   #       # For a client configuration, one peer entry for the server will suffice. |       dns = [ "10.0.69.4" ]; | ||||||
|   #       { |       peers = [ | ||||||
|   #         publicKey = "c1J4p63rD3IlszugMZiki7UBV3YmDdqa3DU4UejXzAI="; |         # For a client configuration, one peer entry for the server will suffice. | ||||||
|   #         allowedIPs = [ "10.0.69.0/24" ]; |         { | ||||||
|   #         # Set this to the server IP and port. |           publicKey = "c1J4p63rD3IlszugMZiki7UBV3YmDdqa3DU4UejXzAI="; | ||||||
|   #         endpoint = "sealight.xyz:60990"; # ToDo: route to endpoint not automatically configured https://wiki.archlinux.org/index.php/WireGuard#Loop_routing https://discourse.nixos.org/t/solved-minimal-firewall-setup-for-wireguard-client/7577 |           allowedIPs = [ "10.0.69.0/24" ]; | ||||||
|   #         persistentKeepalive = 25; |           # Set this to the server IP and port. | ||||||
|   #       } |           endpoint = "sealight.xyz:60990"; # ToDo: route to endpoint not automatically configured https://wiki.archlinux.org/index.php/WireGuard#Loop_routing https://discourse.nixos.org/t/solved-minimal-firewall-setup-for-wireguard-client/7577 | ||||||
|   #     ]; |           persistentKeepalive = 25; | ||||||
|   #   }; |         } | ||||||
|   # }; |       ]; | ||||||
|  |     }; | ||||||
|  |   }; | ||||||
| 
 | 
 | ||||||
|   # Auto upgrade nix package and the daemon service. |   # Auto upgrade nix package and the daemon service. | ||||||
|   services.nix-daemon.enable = true; |   services.nix-daemon.enable = true; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue