Skip to content

Commit

Permalink
nixos: escape brackets in systemd units
Browse files Browse the repository at this point in the history
One day we should just whitelist instead of blacklist chars.

Fixes NixOS/nixops#614
  • Loading branch information
domenkozar committed Apr 12, 2017
1 parent 8c56608 commit 635822d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nixos/modules/system/boot/systemd-lib.nix
Expand Up @@ -10,7 +10,7 @@ rec {

makeUnit = name: unit:
let
pathSafeName = lib.replaceChars ["@" ":" "\\"] ["-" "-" "-"] name;
pathSafeName = lib.replaceChars ["@" ":" "\\" "[" "]"] ["-" "-" "-" "" ""] name;
in
if unit.enable then
pkgs.runCommand "unit-${pathSafeName}"
Expand Down

0 comments on commit 635822d

Please sign in to comment.