converted to working wireguard module
This commit is contained in:
		
							parent
							
								
									c1650e57c8
								
							
						
					
					
						commit
						04490dceb8
					
				|  | @ -122,10 +122,10 @@ | ||||||
|             }; |             }; | ||||||
|             suites = with profiles; rec { |             suites = with profiles; rec { | ||||||
|               base = [ core users.root users.anish ]; |               base = [ core users.root users.anish ]; | ||||||
|               sealight = [ base server ]; # matrix rsshub backup wireguard |               sealight = [ base server ]; # matrix rsshub backup wireguard-server | ||||||
|               mossnet = [ base server taskd wireguard-box shaarli wallabag dns backup monitoring nfs rss-bridge gonic headphones radicale ]; # hpi syncthing |               mossnet = [ base server taskd wireguard-box shaarli wallabag dns monitoring nfs rss-bridge gonic headphones radicale ]; # hpi syncthing | ||||||
|               cube = [ base site server ]; # backup |               cube = [ base site server ]; # backup | ||||||
|               graphical = [ base bluetooth music sync wireguard wifi desktop ]; |               graphical = [ base bluetooth music sync wifi desktop ]; | ||||||
|               curve = [ graphical secrets ]; # backup? |               curve = [ graphical secrets ]; # backup? | ||||||
|               work = [ base ]; |               work = [ base ]; | ||||||
|             }; |             }; | ||||||
|  |  | ||||||
|  | @ -32,4 +32,12 @@ | ||||||
|     # seafile? |     # seafile? | ||||||
|     # syncthing |     # syncthing | ||||||
|   }; |   }; | ||||||
|  | 
 | ||||||
|  |   #age.secrets.box-wg.file = "${self}/secrets/curve-wg.age"; | ||||||
|  |   #age.secrets.box-wg.owner = "anish"; | ||||||
|  |   #mossnet.wg = { | ||||||
|  |   #  enable = true; | ||||||
|  |   #  ips = [ "10.0.69.4/24" ]; | ||||||
|  |   #  privateKeyFile = "/run/agenix/box-wg"; | ||||||
|  |   #}; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -28,6 +28,14 @@ | ||||||
| 
 | 
 | ||||||
|   boot.supportedFilesystems = [ "ntfs" ]; |   boot.supportedFilesystems = [ "ntfs" ]; | ||||||
| 
 | 
 | ||||||
|  |   age.secrets.curve-wg.file = "${self}/secrets/curve-wg.age"; | ||||||
|  |   age.secrets.curve-wg.owner = "anish"; | ||||||
|  |   mossnet.wg = { | ||||||
|  |     enable = true; | ||||||
|  |     ips = [ "10.0.69.2/24" ]; | ||||||
|  |     privateKeyFile = "/run/agenix/curve-wg"; | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|   age.secrets.borg-password.file = "${self}/secrets/borg-password.age"; |   age.secrets.borg-password.file = "${self}/secrets/borg-password.age"; | ||||||
|   mossnet.backup = { |   mossnet.backup = { | ||||||
|     enable = true; |     enable = true; | ||||||
|  |  | ||||||
|  | @ -6,7 +6,7 @@ in | ||||||
| { | { | ||||||
|   options = { |   options = { | ||||||
|     mossnet.wg = { |     mossnet.wg = { | ||||||
|       enable = mkEnableOption "Gain access to all mossnet systems through wireguard, but only if it's already included in the server config"; |       enable = mkEnableOption "Gain access to all mossnet systems through wireguard"; | ||||||
|       ips = lib.mkOption { |       ips = lib.mkOption { | ||||||
|         type = with types; listOf str; |         type = with types; listOf str; | ||||||
|         default = { }; |         default = { }; | ||||||
|  | @ -16,6 +16,7 @@ in | ||||||
|         description = '' |         description = '' | ||||||
|           The IP this machine is allowed to connect to |           The IP this machine is allowed to connect to | ||||||
|         ''; |         ''; | ||||||
|  |       }; | ||||||
|       privateKeyFile = lib.mkOption { |       privateKeyFile = lib.mkOption { | ||||||
|         type = types.path; |         type = types.path; | ||||||
|         default = { }; |         default = { }; | ||||||
|  | @ -29,7 +30,6 @@ in | ||||||
|       }; |       }; | ||||||
|     }; |     }; | ||||||
|   }; |   }; | ||||||
|   }; |  | ||||||
|   config = mkIf cfg.enable { |   config = mkIf cfg.enable { | ||||||
|     networking.firewall.allowedUDPPorts = [ 60990 ]; |     networking.firewall.allowedUDPPorts = [ 60990 ]; | ||||||
|     networking.wireguard.interfaces = { |     networking.wireguard.interfaces = { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue