0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

treewide: use optionalString instead of 'then ""'

This commit is contained in:
Felix Buehler 2023-06-24 20:19:19 +02:00
parent e9e3f2e736
commit f3719756b5
53 changed files with 101 additions and 116 deletions

View file

@ -4,7 +4,7 @@ with lib;
let
cfg = config.services.lighttpd.cgit;
pathPrefix = if stringLength cfg.subdir == 0 then "" else "/" + cfg.subdir;
pathPrefix = optionalString (stringLength cfg.subdir != 0) ("/" + cfg.subdir);
configFile = pkgs.writeText "cgitrc"
''
# default paths to static assets