Loading nixos/lib/eval-config.nix +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ evalConfigArgs@ , prefix ? [] , lib ? import ../../lib , extraModules ? let e = builtins.getEnv "NIXOS_EXTRA_MODULE_PATH"; in if e == "" then [] else [(import e)] in lib.optional (e != "") (import e) }: let pkgs_ = pkgs; Loading nixos/modules/installer/netboot/netboot.nix +1 −3 Original line number Diff line number Diff line Loading @@ -39,9 +39,7 @@ with lib; # !!! Hack - attributes expected by other modules. environment.systemPackages = [ pkgs.grub2_efi ] ++ (if pkgs.stdenv.hostPlatform.system == "aarch64-linux" then [] else [ pkgs.grub2 pkgs.syslinux ]); ++ (lib.optionals (pkgs.stdenv.hostPlatform.system != "aarch64-linux") [pkgs.grub2 pkgs.syslinux]); fileSystems."/" = mkImageMediaOverride { fsType = "tmpfs"; Loading nixos/modules/services/misc/zoneminder.nix +1 −1 Original line number Diff line number Diff line Loading @@ -351,7 +351,7 @@ in { CacheDirectory = dirs cacheDirs; RuntimeDirectory = dirName; ReadWriteDirectories = lib.mkIf useCustomDir [ cfg.storageDir ]; StateDirectory = dirs (if useCustomDir then [] else libDirs); StateDirectory = dirs (lib.optional (!useCustomDir) libDirs); LogsDirectory = dirName; PrivateTmp = true; ProtectSystem = "strict"; Loading nixos/modules/services/search/kibana.nix +2 −2 Original line number Diff line number Diff line Loading @@ -130,9 +130,9 @@ in { This defaults to the singleton list [ca] when the {option}`ca` option is defined. ''; default = if cfg.elasticsearch.ca == null then [] else [ca]; default = lib.optional (cfg.elasticsearch.ca != null) ca; defaultText = literalExpression '' if config.${opt.elasticsearch.ca} == null then [ ] else [ ca ] lib.optional (config.${opt.elasticsearch.ca} != null) ca ''; type = types.listOf types.path; }; Loading nixos/modules/services/security/kanidm.nix +1 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ let # If the new path is a prefix to some existing path, we need to filter it out filteredPaths = lib.filter (p: !lib.hasPrefix (builtins.toString newPath) (builtins.toString p)) merged; # If a prefix of the new path is already in the list, do not add it filteredNew = if hasPrefixInList filteredPaths newPath then [] else [ newPath ]; filteredNew = lib.optional (!hasPrefixInList filteredPaths newPath) newPath; in filteredPaths ++ filteredNew) []; defaultServiceConfig = { Loading Loading
nixos/lib/eval-config.nix +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ evalConfigArgs@ , prefix ? [] , lib ? import ../../lib , extraModules ? let e = builtins.getEnv "NIXOS_EXTRA_MODULE_PATH"; in if e == "" then [] else [(import e)] in lib.optional (e != "") (import e) }: let pkgs_ = pkgs; Loading
nixos/modules/installer/netboot/netboot.nix +1 −3 Original line number Diff line number Diff line Loading @@ -39,9 +39,7 @@ with lib; # !!! Hack - attributes expected by other modules. environment.systemPackages = [ pkgs.grub2_efi ] ++ (if pkgs.stdenv.hostPlatform.system == "aarch64-linux" then [] else [ pkgs.grub2 pkgs.syslinux ]); ++ (lib.optionals (pkgs.stdenv.hostPlatform.system != "aarch64-linux") [pkgs.grub2 pkgs.syslinux]); fileSystems."/" = mkImageMediaOverride { fsType = "tmpfs"; Loading
nixos/modules/services/misc/zoneminder.nix +1 −1 Original line number Diff line number Diff line Loading @@ -351,7 +351,7 @@ in { CacheDirectory = dirs cacheDirs; RuntimeDirectory = dirName; ReadWriteDirectories = lib.mkIf useCustomDir [ cfg.storageDir ]; StateDirectory = dirs (if useCustomDir then [] else libDirs); StateDirectory = dirs (lib.optional (!useCustomDir) libDirs); LogsDirectory = dirName; PrivateTmp = true; ProtectSystem = "strict"; Loading
nixos/modules/services/search/kibana.nix +2 −2 Original line number Diff line number Diff line Loading @@ -130,9 +130,9 @@ in { This defaults to the singleton list [ca] when the {option}`ca` option is defined. ''; default = if cfg.elasticsearch.ca == null then [] else [ca]; default = lib.optional (cfg.elasticsearch.ca != null) ca; defaultText = literalExpression '' if config.${opt.elasticsearch.ca} == null then [ ] else [ ca ] lib.optional (config.${opt.elasticsearch.ca} != null) ca ''; type = types.listOf types.path; }; Loading
nixos/modules/services/security/kanidm.nix +1 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ let # If the new path is a prefix to some existing path, we need to filter it out filteredPaths = lib.filter (p: !lib.hasPrefix (builtins.toString newPath) (builtins.toString p)) merged; # If a prefix of the new path is already in the list, do not add it filteredNew = if hasPrefixInList filteredPaths newPath then [] else [ newPath ]; filteredNew = lib.optional (!hasPrefixInList filteredPaths newPath) newPath; in filteredPaths ++ filteredNew) []; defaultServiceConfig = { Loading