diff --git a/archachatina.nix b/archachatina.nix index 8f3e20f..4eedc47 100644 --- a/archachatina.nix +++ b/archachatina.nix @@ -5,6 +5,7 @@ [ ./common.nix ./uefi.nix + ./fstrim.nix ]; environment.etc."lvm/lvm.conf".text = '' diff --git a/euhadra.nix b/euhadra.nix index d7f20e0..d7fee16 100644 --- a/euhadra.nix +++ b/euhadra.nix @@ -5,6 +5,7 @@ [ ./common.nix ./uefi.nix + ./fstrim.nix ]; boot.initrd.luks.devices = [ { name = "euhadra_crypt"; device = "/dev/disk/by-uuid/328a9ede-0958-490b-8e82-62b06b839e21"; preLVM = true; } ]; diff --git a/fstrim.nix b/fstrim.nix new file mode 100644 index 0000000..0b8d552 --- /dev/null +++ b/fstrim.nix @@ -0,0 +1,15 @@ +{ config, pkgs, ... }: +{ + systemd.services.fstrimroot = { + path = [ pkgs.eject ]; + + restartIfChanged = false; + serviceConfig = { + Type = "oneshot"; + }; + + script = "fstrim -v /"; + + startAt = "04:00"; + }; +} diff --git a/theba.nix b/theba.nix index 83b6ef4..f7b8549 100644 --- a/theba.nix +++ b/theba.nix @@ -5,6 +5,7 @@ [ ./common.nix ./uefi.nix + ./fstrim.nix ]; environment.etc."lvm/lvm.conf".text = ''