diff options
author | Nikolay Amiantov <ab@fmap.me> | 2017-02-02 00:51:16 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2017-02-02 00:52:54 +0300 |
commit | 8ef14f80e3d4d27644dec3d6d47152ae4b40ab07 (patch) | |
tree | 7faf81d7e39760ffb85a3c3ea8ca651903dbfe3c /nixos/modules/system/boot/systemd-lib.nix | |
parent | dd934beb9fce6345097008c0316e18880b052129 (diff) | |
download | nixlib-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.nix | 8 |
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: '' |