diff options
author | Domen Kožar <domen@dev.si> | 2017-04-12 15:53:50 +0200 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2017-04-12 15:56:26 +0200 |
commit | 635822da82377d67a02588a58a5fc1e9c5abfc2c (patch) | |
tree | f24578bccf37464016ae0aac4d99cbf6b8934992 /nixos | |
parent | 8c5660807899a6c5c7e0f5e815770960181f8804 (diff) | |
download | nixlib-635822da82377d67a02588a58a5fc1e9c5abfc2c.tar nixlib-635822da82377d67a02588a58a5fc1e9c5abfc2c.tar.gz nixlib-635822da82377d67a02588a58a5fc1e9c5abfc2c.tar.bz2 nixlib-635822da82377d67a02588a58a5fc1e9c5abfc2c.tar.lz nixlib-635822da82377d67a02588a58a5fc1e9c5abfc2c.tar.xz nixlib-635822da82377d67a02588a58a5fc1e9c5abfc2c.tar.zst nixlib-635822da82377d67a02588a58a5fc1e9c5abfc2c.zip |
nixos: escape brackets in systemd units
One day we should just whitelist instead of blacklist chars. Fixes https://github.com/NixOS/nixops/issues/614
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/system/boot/systemd-lib.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/systemd-lib.nix b/nixos/modules/system/boot/systemd-lib.nix index 7dbf3b25cdb0..7c01f8ea9b7f 100644 --- a/nixos/modules/system/boot/systemd-lib.nix +++ b/nixos/modules/system/boot/systemd-lib.nix @@ -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}" |