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:
parent
a412d90e10
commit
692656daf8
1 changed files with 1 additions and 3 deletions
|
@ -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
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue