forked from jan-leila/nix-config
		
	refactor: split server modules into smaller more manageable files
This commit is contained in:
		
							parent
							
								
									b2e5ae1f98
								
							
						
					
					
						commit
						cdeb4e108b
					
				
					 49 changed files with 1519 additions and 1270 deletions
				
			
		
							
								
								
									
										25
									
								
								modules/nixos-modules/server/paperless/impermanence.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								modules/nixos-modules/server/paperless/impermanence.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,25 @@ | |||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: let | ||||
|   dataDir = "/var/lib/paperless"; | ||||
| in { | ||||
|   config = lib.mkIf (config.services.paperless.enable && config.host.impermanence.enable) { | ||||
|     assertions = [ | ||||
|       { | ||||
|         assertion = config.services.paperless.dataDir == dataDir; | ||||
|         message = "paperless data location does not match persistence"; | ||||
|       } | ||||
|     ]; | ||||
|     environment.persistence."/persist/system/root" = { | ||||
|       directories = [ | ||||
|         { | ||||
|           directory = dataDir; | ||||
|           user = "paperless"; | ||||
|           group = "paperless"; | ||||
|         } | ||||
|       ]; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue