From 9d390511eb0535a93259b779274d2b1ac617620e Mon Sep 17 00:00:00 2001 From: Magic_RB Date: Sat, 16 Sep 2023 16:41:21 +0200 Subject: [PATCH] Auto mount second sdcard too Signed-off-by: Magic_RB --- nixos/common/steam.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nixos/common/steam.nix b/nixos/common/steam.nix index f34dcc4..71cae6b 100644 --- a/nixos/common/steam.nix +++ b/nixos/common/steam.nix @@ -19,7 +19,9 @@ }; services.udev.extraRules = '' - ACTION=="add", SUBSYSTEM=="block", ENV{ID_PART_ENTRY_UUID}=="a7588d17-2c04-4bb7-8c10-b2aaeed1826c" RUN{program}+="${pkgs.systemd}/bin/systemd-mount --no-block $devnode /media/steam_library" - ACTION=="remove", SUBSYSTEM=="block", ENV{ID_PART_ENTRY_UUID}=="a7588d17-2c04-4bb7-8c10-b2aaeed1826c" RUN{program}+="${pkgs.systemd}/bin/systemctl stop media-steam_library.mount" + ACTION=="add", SUBSYSTEM=="block", ENV{ID_PART_ENTRY_UUID}=="a7588d17-2c04-4bb7-8c10-b2aaeed1826c" RUN{program}+="${pkgs.systemd}/bin/systemd-mount --no-block $devnode /media/steam_library/1" + ACTION=="remove", SUBSYSTEM=="block", ENV{ID_PART_ENTRY_UUID}=="a7588d17-2c04-4bb7-8c10-b2aaeed1826c" RUN{program}+="${pkgs.systemd}/bin/systemctl stop media-steam_library-1.mount" + ACTION=="add", SUBSYSTEM=="block", ENV{ID_PART_ENTRY_UUID}=="89910513-3f2d-4b49-bf0d-ec667d532c61" RUN{program}+="${pkgs.systemd}/bin/systemd-mount --no-block $devnode /media/steam_library/2" + ACTION=="remove", SUBSYSTEM=="block", ENV{ID_PART_ENTRY_UUID}=="89910513-3f2d-4b49-bf0d-ec667d532c61" RUN{program}+="${pkgs.systemd}/bin/systemctl stop media-steam_library-2.mount" ''; }