From 5d1bd82ba4bef33e767b42f494fa1921974aec13 Mon Sep 17 00:00:00 2001 From: Lillian-Violet Date: Thu, 21 Mar 2024 13:19:36 +0100 Subject: [PATCH] Try this to restart it --- nixos/hosts/shodan/auto-mount.nix | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) 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; - }; - }; }