Let's try this then
This commit is contained in:
parent
c55c65998c
commit
83e04ab281
|
@ -15,14 +15,14 @@
|
||||||
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."external-drive-mount@" = {
|
systemd.services."external-drive-mount@" = {
|
||||||
path = with pkgs; [jq coreutils udisks bash];
|
path = with pkgs; [jq coreutils udisks bash automount];
|
||||||
enable = true;
|
enable = true;
|
||||||
description = "Mount External Drive on %i";
|
description = "Mount External Drive on %i";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
ExecStart = "/run/current-system/sw/bin/automount add %i";
|
ExecStart = "automount add %i";
|
||||||
ExecStop = "/run/current-system/sw/bin/automount remove %i";
|
ExecStop = "automount remove %i";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue