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
@ -10,7 +10,7 @@ rec {
|
|||||||
|
|
||||||
makeUnit = name: unit:
|
makeUnit = name: unit:
|
||||||
let
|
let
|
||||||
pathSafeName = lib.replaceChars ["@" ":" "\\"] ["-" "-" "-"] name;
|
pathSafeName = lib.replaceChars ["@" ":" "\\" "[" "]"] ["-" "-" "-" "" ""] name;
|
||||||
in
|
in
|
||||||
if unit.enable then
|
if unit.enable then
|
||||||
pkgs.runCommand "unit-${pathSafeName}"
|
pkgs.runCommand "unit-${pathSafeName}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user