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" ];
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'";
};
})
];