Rename service and see if it works now
This commit is contained in:
		
							parent
							
								
									f24a6cb9a0
								
							
						
					
					
						commit
						5b7093dde0
					
				
					 1 changed files with 2 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -16,17 +16,14 @@
 | 
			
		|||
    KERNEL=="nvme0n1p9|nvme0n1p1[0-9]", ACTION=="add", RUN+="${pkgs.systemd}/bin/systemctl start --no-block external-drive-mount@%k.service"
 | 
			
		||||
    KERNEL=="nvme0n1p9|nvme0n1p1[0-9]", ACTION=="remove", RUN+="${pkgs.systemd}/bin/systemctl stop --no-block external-drive-mount@%k.service"
 | 
			
		||||
  '';
 | 
			
		||||
  systemd.services.auto-mount = {
 | 
			
		||||
  systemd.services."external-drive-mount@" = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    description = "Mount External Drive on %i";
 | 
			
		||||
    unitConfig = {
 | 
			
		||||
    };
 | 
			
		||||
    serviceConfig = {
 | 
			
		||||
      Type = "oneshot";
 | 
			
		||||
      RemainAfterExit = true;
 | 
			
		||||
      ExecStart = "/run/current-system/sw/bin/automount add %i";
 | 
			
		||||
      ExecStop = "/run/current-system/sw/bin/automount remove %i";
 | 
			
		||||
      RemainAfterExit = true;
 | 
			
		||||
    };
 | 
			
		||||
    wantedBy = ["multi-user.target"];
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue