refactor: use lib.optionals instead of if...then...else...

This commit is contained in:
Ryan Yin
2024-03-08 22:53:49 +08:00
parent 54c2240be6
commit 3247e4a8e6
5 changed files with 129 additions and 136 deletions

View File

@@ -41,8 +41,7 @@
exercism
]
++ (
if pkgs.stdenv.isLinux
then [
lib.optionals pkgs.stdenv.isLinux [
# Automatically trims your branches whose tracking remote refs are merged or gone
# It's really useful when you work on a project for a long time.
git-trim
@@ -57,7 +56,6 @@
wireshark # network analyzer
ventoy # create bootable usb
]
else []
);
programs = {