diff --git a/nixos/hosts/shodan/auto-mount.nix b/nixos/hosts/shodan/auto-mount.nix index b030b21..ac5b56a 100644 --- a/nixos/hosts/shodan/auto-mount.nix +++ b/nixos/hosts/shodan/auto-mount.nix @@ -17,11 +17,12 @@ KERNEL=="nvme0n1p9|nvme0n1p1[0-9]", ACTION=="remove", RUN+="${pkgs.systemd}/bin/systemctl stop --no-block external-drive-mount@%k.service" KERNEL=="nvme0n1p9|nvme0n1p1[0-9]", ACTION=="remove", RUN+="${pkgs.systemd}/bin/systemctl start --no-block external-drive-unmount@%k.service" ''; + systemd.services."external-drive-mount@" = { path = with pkgs; [jq coreutils udisks bash util-linux auto-mount]; enable = true; description = "Mount External Drive on %i"; - script = "auto-mount add"; + script = "auto-mount add "; scriptArgs = "%i"; serviceConfig = { Type = "oneshot";