Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ source $OMARCHY_INSTALL/config/power.sh
source $OMARCHY_INSTALL/config/timezones.sh
source $OMARCHY_INSTALL/config/login.sh
source $OMARCHY_INSTALL/config/nvidia.sh
source $OMARCHY_INSTALL/config/ssd-trim.sh

# Development
show_logo decrypt 920
Expand Down
8 changes: 8 additions & 0 deletions install/config/ssd-trim.sh

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per the arch wiki, https://wiki.archlinux.org/title/Solid_state_drive#TRIM the correct way to verify TRIM support for SSD drives is with lsblk --discard.

I should also add as a note that if a user encrypts their disk with LUKS. Fstrim service won't work as it's disabled by default. https://wiki.archlinux.org/title/Dm-crypt/Specialties#Discard/TRIM_support_for_solid_state_drives_(SSD)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok since LUKS is required. I close my PR

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

if grep -q 0 /sys/block/*/queue/rotational; then
echo "Non-rotational device detected → enabling fstrim.timer"
sudo systemctl enable --now fstrim.timer
else
echo "No non-rotational device detected → skipping fstrim.timer activation"
fi
3 changes: 3 additions & 0 deletions migrations/1755420126.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
echo "Check and enable TRIM if needed"

source ~/.local/share/omarchy/install/config/ssd-trim.sh