clean up get-music, needs to be in it's own proflie
This commit is contained in:
		
							parent
							
								
									438bb4b8a7
								
							
						
					
					
						commit
						59e2700336
					
				|  | @ -1,12 +1,20 @@ | |||
| { pkgs, lib, ... }: | ||||
| 
 | ||||
| { | ||||
|   services.cron = { | ||||
|     enable = true; | ||||
|     systemCronJobs = [ | ||||
|       "* */24 * * * *     anish     /etc/get-music.sh" | ||||
|   systemd.services.get-music-sync = { | ||||
|     serviceConfig.Type = "oneshot"; | ||||
|     path = [ | ||||
|       pkgs.coreutils | ||||
|       pkgs.rsync | ||||
|     ]; | ||||
|     script = builtins.readFile ./get-music.sh; | ||||
|     serviceConfig = { | ||||
|       User = "anish"; | ||||
|     }; | ||||
|   }; | ||||
|   systemd.timers.get-music-timer = { | ||||
|     wantedBy = [ "timers.target" ]; | ||||
|     partOf = [ "get-music-sync.service" ]; | ||||
|     timerConfig.OnCalendar = [ "daily" ]; | ||||
|   }; | ||||
|   environment.etc."get-music.sh".text = builtins.readFile "./get-music.sh"; | ||||
|   evironment.systemPackages = [ pkgs.rsync ]; | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue