Mount the hut nix store for SLURM jobs
This commit is contained in:
		
							parent
							
								
									70a9e855cf
								
							
						
					
					
						commit
						3040a803b2
					
				
							
								
								
									
										19
									
								
								m/module/slurm-hut-nix-store.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								m/module/slurm-hut-nix-store.nix
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,19 @@ | |||||||
|  | { ... }: | ||||||
|  | 
 | ||||||
|  | { | ||||||
|  |   # Mount the hut nix store via NFS | ||||||
|  |   fileSystems."/mnt/hut-nix-store" = { | ||||||
|  |     device = "hut:/nix/store"; | ||||||
|  |     fsType = "nfs"; | ||||||
|  |     options = [ "ro" ]; | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  |   systemd.services.slurmd.serviceConfig = { | ||||||
|  |     # When running a job, bind the hut store in /nix/store so the paths are | ||||||
|  |     # available too. | ||||||
|  |     # FIXME: This doesn't keep the programs in /run/current-system/sw/bin | ||||||
|  |     # available in the store. Ideally they should be merged but the overlay FS | ||||||
|  |     # doesn't work when the underlying directories change. | ||||||
|  |     BindReadOnlyPaths = "/mnt/hut-nix-store:/nix/store"; | ||||||
|  |   }; | ||||||
|  | } | ||||||
| @ -5,6 +5,7 @@ | |||||||
|     ../common/main.nix |     ../common/main.nix | ||||||
|     ../module/ceph.nix |     ../module/ceph.nix | ||||||
|     ../module/slurm-firewall.nix |     ../module/slurm-firewall.nix | ||||||
|  |     ../module/slurm-hut-nix-store.nix | ||||||
|   ]; |   ]; | ||||||
| 
 | 
 | ||||||
|   # Select the this using the ID to avoid mismatches |   # Select the this using the ID to avoid mismatches | ||||||
|  | |||||||
| @ -5,6 +5,7 @@ | |||||||
|     ../common/main.nix |     ../common/main.nix | ||||||
|     ../module/ceph.nix |     ../module/ceph.nix | ||||||
|     ../module/slurm-firewall.nix |     ../module/slurm-firewall.nix | ||||||
|  |     ../module/slurm-hut-nix-store.nix | ||||||
|   ]; |   ]; | ||||||
| 
 | 
 | ||||||
|   # Select the this using the ID to avoid mismatches |   # Select the this using the ID to avoid mismatches | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user