Rename service and see if it works now
This commit is contained in:
parent
f24a6cb9a0
commit
5b7093dde0
|
@ -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=="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"
|
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;
|
enable = true;
|
||||||
description = "Mount External Drive on %i";
|
description = "Mount External Drive on %i";
|
||||||
unitConfig = {
|
|
||||||
};
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
RemainAfterExit = true;
|
||||||
ExecStart = "/run/current-system/sw/bin/automount add %i";
|
ExecStart = "/run/current-system/sw/bin/automount add %i";
|
||||||
ExecStop = "/run/current-system/sw/bin/automount remove %i";
|
ExecStop = "/run/current-system/sw/bin/automount remove %i";
|
||||||
RemainAfterExit = true;
|
|
||||||
};
|
};
|
||||||
wantedBy = ["multi-user.target"];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue