nixos/zfs: avoid script derivation for trim service

Since we only have a single pipe we can save the overhead of building a derivation
when creating the zfs trim service file when building the system.
This commit is contained in:
Jörg Thalheim 2019-10-07 10:50:30 +01:00
parent a412d90e10
commit 692656daf8
No known key found for this signature in database
GPG key ID: B3F5D81B0C6967C4

View file

@ -558,9 +558,7 @@ in
after = [ "zfs-import.target" ]; after = [ "zfs-import.target" ];
path = [ packages.zfsUser ]; path = [ packages.zfsUser ];
startAt = cfgTrim.interval; startAt = cfgTrim.interval;
script = '' serviceConfig.ExecStart = "${pkgs.runtimeShell} -c 'zpool list -H -o name | xargs --no-run-if-empty -n1 zpool trim'";
zpool list -H -o name | xargs --no-run-if-empty -n1 zpool trim
'';
}; };
}) })
]; ];