···16 generate = name: value:
17 let mkParam = k: v:
18 if v == null then []
19- else if isBool v then if v then [("--"+k)] else []
20 else [("--"+k) v];
21 mkParams = k: v: map (mkParam k) (if isList v then v else [v]);
22 in escapeShellArgs (concatLists (concatLists (mapAttrsToList mkParams value)));
···16 generate = name: value:
17 let mkParam = k: v:
18 if v == null then []
19+ else if isBool v then optional v ("--"+k)
20 else [("--"+k) v];
21 mkParams = k: v: map (mkParam k) (if isList v then v else [v]);
22 in escapeShellArgs (concatLists (concatLists (mapAttrsToList mkParams value)));
+1-1
nixos/modules/services/hardware/fwupd.nix
···50 # to install it because it would create a cyclic dependency between
51 # the outputs. We also need to enable the remote,
52 # which should not be done by default.
53- if cfg.enableTestRemote then (enableRemote cfg.package.installedTests "fwupd-tests") else {}
54 );
5556in {
···50 # to install it because it would create a cyclic dependency between
51 # the outputs. We also need to enable the remote,
52 # which should not be done by default.
53+ lib.optionalAttrs cfg.enableTestRemote (enableRemote cfg.package.installedTests "fwupd-tests")
54 );
5556in {
···305306 # If you really have to access root via FTP use mkOverride or userlistDeny
307 # = false and whitelist root
308- services.vsftpd.userlist = if cfg.userlistDeny then ["root"] else [];
309310 systemd = {
311 tmpfiles.rules = optional cfg.anonymousUser
···305306 # If you really have to access root via FTP use mkOverride or userlistDeny
307 # = false and whitelist root
308+ services.vsftpd.userlist = optional cfg.userlistDeny "root";
309310 systemd = {
311 tmpfiles.rules = optional cfg.anonymousUser
···980 ++ luks.cryptoModules
981 # workaround until https://marc.info/?l=linux-crypto-vger&m=148783562211457&w=4 is merged
982 # remove once 'modprobe --show-depends xts' shows ecb as a dependency
983- ++ (if builtins.elem "xts" luks.cryptoModules then ["ecb"] else []);
984985 # copy the cryptsetup binary and it's dependencies
986 boot.initrd.extraUtilsCommands = let
···980 ++ luks.cryptoModules
981 # workaround until https://marc.info/?l=linux-crypto-vger&m=148783562211457&w=4 is merged
982 # remove once 'modprobe --show-depends xts' shows ecb as a dependency
983+ ++ (optional (builtins.elem "xts" luks.cryptoModules) "ecb");
984985 # copy the cryptsetup binary and it's dependencies
986 boot.initrd.extraUtilsCommands = let
···611 };
612613 meta =
614- let cc_ = if cc != null then cc else {}; in
615- (if cc_ ? meta then removeAttrs cc.meta ["priority"] else {}) //
616 { description =
617 lib.attrByPath ["meta" "description"] "System C compiler" cc_
618 + " (wrapper script)";
···26 in lib.mapAttrs buildCudaToolkitRedistPackage attrs;
2728 # All cudatoolkit redist packages for the current cuda version
29- cudaToolkitRedistPackages = if
30- lib.hasAttr cudaVersion cudaToolkitRedistManifests
31- then buildCudaToolkitRedistPackages { version = cudaVersion; manifest = cudaToolkitRedistManifests.${cudaVersion}; }
32- else {};
3334in cudaToolkitRedistPackages
···26 in lib.mapAttrs buildCudaToolkitRedistPackage attrs;
2728 # All cudatoolkit redist packages for the current cuda version
29+ cudaToolkitRedistPackages = lib.optionalAttrs (lib.hasAttr cudaVersion cudaToolkitRedistManifests)
30+ (buildCudaToolkitRedistPackages { version = cudaVersion; manifest = cudaToolkitRedistManifests.${cudaVersion}; });
003132in cudaToolkitRedistPackages