forked from jan-leila/nix-config
		
	installed tailscale on all machines
This commit is contained in:
		
							parent
							
								
									9bfa5c9e8d
								
							
						
					
					
						commit
						2e0f71a6fa
					
				
					 7 changed files with 133 additions and 62 deletions
				
			
		
							
								
								
									
										34
									
								
								modules/nixos-modules/tailscale.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								modules/nixos-modules/tailscale.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,34 @@ | |||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: let | ||||
|   tailscale_data_directory = "/var/lib/tailscale"; | ||||
| in { | ||||
|   options.host.tailscale = { | ||||
|     enable = lib.mkEnableOption "should tailscale be enabled on this computer"; | ||||
|   }; | ||||
| 
 | ||||
|   config = lib.mkIf config.services.tailscale.enable ( | ||||
|     lib.mkMerge [ | ||||
|       { | ||||
|         # any configs we want shared between all machines | ||||
|       } | ||||
|       (lib.mkIf config.host.impermanence.enable { | ||||
|         environment.persistence = { | ||||
|           "/persist/system/root" = { | ||||
|             enable = true; | ||||
|             hideMounts = true; | ||||
|             directories = [ | ||||
|               { | ||||
|                 directory = tailscale_data_directory; | ||||
|                 user = "jellyfin"; | ||||
|                 group = "jellyfin"; | ||||
|               } | ||||
|             ]; | ||||
|           }; | ||||
|         }; | ||||
|       }) | ||||
|     ] | ||||
|   ); | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue