nixos: escape brackets in systemd units
One day we should just whitelist instead of blacklist chars. Fixes https://github.com/NixOS/nixops/issues/614
This commit is contained in:
parent
8c56608078
commit
635822da82
1 changed files with 1 additions and 1 deletions
|
@ -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}"
|
||||
|
|
Loading…
Reference in a new issue