index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Thomas <9749173+uhthomas@users.noreply.github.com> | 2022-01-20 15:32:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 16:32:07 +0100 |
commit | 671bf7595c44633db60ce3e139fcc4ccda891325 (patch) | |
tree | aee9658c39ea6f543de7416d1d98725daca18bfc | |
parent | c776e30191224b3a6cd9d3712576e88b54bf1ca6 (diff) |
-rw-r--r-- | archinstall/lib/installer.py | 12 |
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 260094c8..4ba304f6 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -390,6 +390,11 @@ class Installer: self.log('Enabling espeakup.service for speech synthesis (accessibility).', level=logging.INFO) self.enable_service('espeakup') + def enable_periodic_trim(self) -> None: + self.log("Enabling periodic TRIM") + # fstrim is owned by util-linux, a dependency of both base and systemd. + self.enable_service("fstrim.timer") + def enable_service(self, *services :str) -> None: for service in services: self.log(f'Enabling service {service}', level=logging.INFO) @@ -571,6 +576,13 @@ class Installer: self.pacstrap(self.base_packages) self.helper_flags['base-strapped'] = True + # Periodic TRIM may improve the performance and longevity of SSDs whilst + # having no adverse effect on other devices. Most distributions enable + # periodic TRIM by default. + # + # https://github.com/archlinux/archinstall/issues/880 + self.enable_periodic_trim() + # TODO: Support locale and timezone # os.remove(f'{self.target}/etc/localtime') # sys_command(f'/usr/bin/arch-chroot {self.target} ln -s /usr/share/zoneinfo/{localtime} /etc/localtime') |