From 4cada34b7f85b95c5e1c071ed629b7e6876a8a9a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 12 Nov 2013 16:58:36 +0100 Subject: [PATCH] Properly handle unit names with dashes in them We ended up with files in /etc/systemd/system called "bigx2ddata.mount.wants" rather than "big\x2ddata.mount.wants". --- nixos/modules/system/boot/systemd.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index c1fb2c45165..7c6807340fd 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -348,14 +348,14 @@ let ${concatStrings (mapAttrsToList (name: unit: concatMapStrings (name2: '' - mkdir -p $out/${name2}.wants - ln -sfn ../${name} $out/${name2}.wants/ + mkdir -p $out/'${name2}.wants' + ln -sfn '../${name}' $out/'${name2}.wants'/ '') unit.wantedBy) cfg.units)} ${concatStrings (mapAttrsToList (name: unit: concatMapStrings (name2: '' - mkdir -p $out/${name2}.requires - ln -sfn ../${name} $out/${name2}.requires/ + mkdir -p $out/'${name2}.requires' + ln -sfn '../${name}' $out/'${name2}.requires'/ '') unit.requiredBy) cfg.units)} ln -s ${cfg.defaultUnit} $out/default.target