From 692656daf85d17ceb8b9f0ad2a96aea208233857 Mon Sep 17 00:00:00 2001 From: Jörg Thalheim Date: Mon, 7 Oct 2019 10:50:30 +0100 Subject: 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. --- nixos/modules/tasks/filesystems/zfs.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'nixos') diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix index 6cfa510a78a4..c8ba2cac0c10 100644 --- a/nixos/modules/tasks/filesystems/zfs.nix +++ b/nixos/modules/tasks/filesystems/zfs.nix @@ -558,9 +558,7 @@ in after = [ "zfs-import.target" ]; path = [ packages.zfsUser ]; startAt = cfgTrim.interval; - script = '' - zpool list -H -o name | xargs --no-run-if-empty -n1 zpool trim - ''; + serviceConfig.ExecStart = "${pkgs.runtimeShell} -c 'zpool list -H -o name | xargs --no-run-if-empty -n1 zpool trim'"; }; }) ]; -- cgit 1.4.1