Skip to content

Commit ab724fa

Browse files
authored
feat(ujust): Add recipes to disable/enable all automounts (#3052)
Signed-off-by: Zeglius <[email protected]>
1 parent 6505711 commit ab724fa

File tree

2 files changed

+36
-8
lines changed

2 files changed

+36
-8
lines changed

system_files/desktop/shared/usr/share/ublue-os/just/80-bazzite.just

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ add-user-to-input-group:
198198
sudo usermod -a -G input $USER
199199

200200
# Enables automounting of labeled BTRFS/EXT4 partitions under /run/media/system
201+
[group("automounting")]
201202
enable-automounting:
202203
#!/usr/bin/pkexec /usr/bin/bash
203204
set -eo pipefail
@@ -207,6 +208,7 @@ enable-automounting:
207208
fi
208209

209210
# Disables automounting of labeled BTRFS/EXT4 partitions under /run/media/system
211+
[group("automounting")]
210212
disable-automounting:
211213
#!/usr/bin/pkexec /usr/bin/bash
212214
set -eo pipefail
@@ -215,6 +217,40 @@ disable-automounting:
215217
systemctl disable ublue-os-media-automount.service
216218
fi
217219

220+
# Enable framework automounting udev rules.
221+
[group("automounting")]
222+
enable-framework-automount:
223+
#!/usr/bin/pkexec /usr/bin/bash
224+
set -eo pipefail
225+
rm -f /etc/udev/rules.d/99-framework-steam-automount.rules
226+
227+
# Disable framework automounting udev rules.
228+
[group("automounting")]
229+
disable-framework-automount:
230+
#!/usr/bin/pkexec /usr/bin/bash
231+
set -eo pipefail
232+
ln -sf /dev/null /etc/udev/rules.d/99-framework-steam-automount.rules
233+
234+
# Disable SteamOS automount, this fixes ntfs partitions getting mounted.
235+
[group("automounting")]
236+
disable-steamos-automount:
237+
@pkexec ln -sf /dev/null /etc/udev/rules.d/99-steamos-automount.rules
238+
239+
# Enable SteamOS automount.
240+
[group("automounting")]
241+
enable-steamos-automount:
242+
@pkexec rm -f /etc/udev/rules.d/99-steamos-automount.rules
243+
244+
# Disable all partition automounting. This might increase boot times.
245+
[group("automounting")]
246+
disable-automount-all:
247+
@pkexec --keep-cwd ujust disable-framework-automount disable-automounting disable-steamos-automount
248+
249+
# Enable all automounting.
250+
[group("automounting")]
251+
enable-automount-all:
252+
@pkexec --keep-cwd ujust enable-framework-automount enable-automounting enable-steamos-automount
253+
218254
# Enable support for Tailscale
219255
enable-tailscale:
220256
systemctl enable --now tailscaled.service

system_files/desktop/shared/usr/share/ublue-os/just/81-bazzite-fixes.just

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,3 @@ steam-icons ACTION="":
389389
echo "Invalid choice. Exiting without changes."
390390
;;
391391
esac
392-
393-
# Disable SteamOS automount, this fixes ntfs partitions getting mounted.
394-
disable-steamos-automount:
395-
pkexec ln -sf /dev/null /etc/udev/rules.d/99-steamos-automount.rules
396-
397-
# Enable SteamOS automount.
398-
enable-steamos-automount:
399-
pkexec rm -f /etc/udev/rules.d/99-steamos-automount.rules

0 commit comments

Comments
 (0)