diff --git a/nixos/hosts/shodan/auto-mount.nix b/nixos/hosts/shodan/auto-mount.nix index b031289..a2d26db 100644 --- a/nixos/hosts/shodan/auto-mount.nix +++ b/nixos/hosts/shodan/auto-mount.nix @@ -22,21 +22,11 @@ path = with pkgs; [jq coreutils udisks bash util-linux auto-mount]; enable = true; script = "auto-mount add $@"; + preStop = "auto-mount remove $@"; scriptArgs = "%i"; serviceConfig = { Type = "oneshot"; RemainAfterExit = true; }; }; - - systemd.services."external-drive-unmount@" = { - path = with pkgs; [jq coreutils udisks bash util-linux auto-mount]; - enable = true; - script = "auto-mount remove $@"; - scriptArgs = "%i"; - serviceConfig = { - Type = "oneshot"; - RemainAfterExit = false; - }; - }; }