Run fstrim on SSD disks
Eelco Dolstra committed
Mar 15, 2016 at 15:58 UTC
1e2cd479df1e9f40b8ff3f09f5f84107423239f2
2 files changed
+19
-1
delft/chef.nix
+7
-1
@@ -1,7 +1,13 @@
1
{ config, lib, pkgs, ...}:
2
3
{
4
- imports = [ ./common.nix ./hydra.nix ./hydra-proxy.nix ./datadog.nix ];
4
+ imports =
5
+ [ ./common.nix
6
+ ./hydra.nix
7
+ ./hydra-proxy.nix
8
+ ./datadog.nix
9
+ ./fstrim.nix
10
+ ];
11
12
deployment.targetEnv = "hetzner";
13
deployment.hetzner.mainIPv4 = "46.4.67.10";
delft/fstrim.nix
new
+12
@@ -0,0 +1,12 @@
1
+{ config, pkgs, ... }:
2
+
3
+{
4
+
5
+ systemd.services.fstrim =
6
+ { description = "Trim SSD Disks";
7
+ serviceConfig.Type = "oneshot";
8
+ serviceConfig.ExecStart = "${pkgs.utillinux}/bin/fstrim -a -v";
9
+ startAt = "02:35";
10
+ };
11
+
12
+}