51 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
| # Edit this configuration file to define what should be installed on
 | |
| # your system.  Help is available in the configuration.nix(5) man page
 | |
| # and in the NixOS manual (accessible by running `nixos-help`).
 | |
| 
 | |
| { config, pkgs, ... }:
 | |
| 
 | |
| {
 | |
|   imports =
 | |
|     [
 | |
|       ./hardware-configuration.nix
 | |
|       ../default.nix
 | |
|     ];
 | |
| 
 | |
|   stitchyconf = {
 | |
|     form = "server";
 | |
|   };
 | |
| 
 | |
|   networking.hostName = "gemini";
 | |
|   time.timeZone = "America/Los_Angeles";
 | |
| 
 | |
|   # Open ports in the firewall.
 | |
|   networking.firewall.allowedTCPPorts = [ 22 25565 ];
 | |
|   networking.firewall.allowedUDPPorts = [ 51820 ];
 | |
| 
 | |
|   virtualisation.docker.enable = true;
 | |
| 
 | |
|   networking.wg-quick.interfaces = {
 | |
|     wg0 = {
 | |
|       address = [
 | |
|         "10.100.0.4/32"
 | |
|       ];
 | |
| 
 | |
|       listenPort = 51820;
 | |
| 
 | |
|       # Path to the private key file.
 | |
|       privateKeyFile = "/etc/nixos/hosts/gemini/wg.key";
 | |
| 
 | |
|       peers = [{
 | |
|         publicKey = "atXy3zi3FLoxP8hgzJIIeLGks4Te9HrKkQGoaobholM=";
 | |
|         presharedKeyFile = "/etc/nixos/hosts/gemini/wg.psk";
 | |
|         allowedIPs = [ "10.100.0.0/24" ];
 | |
|         endpoint = "moms.wireguard.stitchy.moe:47111";
 | |
|         persistentKeepalive = 25;
 | |
|       }];
 | |
|     };
 | |
|   };
 | |
| 
 | |
| 
 | |
|   system.stateVersion = "23.05"; # Did you read the comment?
 | |
| }
 | |
| 
 |