summary refs log tree commit diff
path: root/nixos/modules/system/boot/systemd-lib.nix
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2017-02-02 00:51:16 +0300
committerNikolay Amiantov <ab@fmap.me>2017-02-02 00:52:54 +0300
commit8ef14f80e3d4d27644dec3d6d47152ae4b40ab07 (patch)
tree7faf81d7e39760ffb85a3c3ea8ca651903dbfe3c /nixos/modules/system/boot/systemd-lib.nix
parentdd934beb9fce6345097008c0316e18880b052129 (diff)
downloadnixlib-8ef14f80e3d4d27644dec3d6d47152ae4b40ab07.tar
nixlib-8ef14f80e3d4d27644dec3d6d47152ae4b40ab07.tar.gz
nixlib-8ef14f80e3d4d27644dec3d6d47152ae4b40ab07.tar.bz2
nixlib-8ef14f80e3d4d27644dec3d6d47152ae4b40ab07.tar.lz
nixlib-8ef14f80e3d4d27644dec3d6d47152ae4b40ab07.tar.xz
nixlib-8ef14f80e3d4d27644dec3d6d47152ae4b40ab07.tar.zst
nixlib-8ef14f80e3d4d27644dec3d6d47152ae4b40ab07.zip
systemd service: add aliases option
Diffstat (limited to 'nixos/modules/system/boot/systemd-lib.nix')
-rw-r--r--nixos/modules/system/boot/systemd-lib.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/systemd-lib.nix b/nixos/modules/system/boot/systemd-lib.nix
index 997770b8beca..7dbf3b25cdb0 100644
--- a/nixos/modules/system/boot/systemd-lib.nix
+++ b/nixos/modules/system/boot/systemd-lib.nix
@@ -159,7 +159,13 @@ rec {
         fi
       done
 
-      # Created .wants and .requires symlinks from the wantedBy and
+      # Create service aliases from aliases option.
+      ${concatStrings (mapAttrsToList (name: unit:
+          concatMapStrings (name2: ''
+            ln -sfn '${name}' $out/'${name2}'
+          '') unit.aliases) units)}
+
+      # Create .wants and .requires symlinks from the wantedBy and
       # requiredBy options.
       ${concatStrings (mapAttrsToList (name: unit:
           concatMapStrings (name2: ''