git.iko.soy/typeable/nixpkgs
on master help sign in
nixos: escape brackets in systemd units

One day we should just whitelist instead of blacklist chars. Fixes https://github.com/NixOS/nixops/issues/614

commit635822da82377d67a02588a58a5fc1e9c5abfc2c authorDomen Kožar <domen@dev.si> dateWed 12 Apr 2017, 15:53 (10 years ago) parent8c56608
1 file changed+1−1
nixos/modules/system/boot/systemd-lib.nix+1−1
nixos/modules/system/boot/systemd-lib.nix+1−1
@@ -10,7 +10,7 @@ rec {
1010
1111 makeUnit = name: unit:
1212 let
13− pathSafeName = lib.replaceChars ["@" ":" "\\"] ["-" "-" "-"] name;
13+ pathSafeName = lib.replaceChars ["@" ":" "\\" "[" "]"] ["-" "-" "-" "" ""] name;
1414 in
1515 if unit.enable then
1616 pkgs.runCommand "unit-${pathSafeName}"