Rename service and see if it works now

This commit is contained in:
Lillian Violet 2024-03-18 15:19:43 +01:00
parent f24a6cb9a0
commit 5b7093dde0

View file

@ -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"];
};
}