From 223f04b3caecf2e52a9ad98abefb2a6f44cd811e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 21 Aug 2012 11:28:47 -0400 Subject: [PATCH] =?UTF-8?q?Add=20option=20=E2=80=98boot.systemd.packages?= =?UTF-8?q?=E2=80=99=20to=20use=20units=20from=20the=20specified=20package?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/system/boot/systemd.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/system/boot/systemd.nix b/modules/system/boot/systemd.nix index def5a8bc580..2045e702fe9 100644 --- a/modules/system/boot/systemd.nix +++ b/modules/system/boot/systemd.nix @@ -250,6 +250,10 @@ let ln -s $i/* $out/ done + for i in ${toString cfg.packages}; do + ln -s $i/etc/systemd/system/* $out/ + done + ${concatStrings (mapAttrsToList (name: unit: concatMapStrings (name2: '' mkdir -p $out/${name2}.wants @@ -288,11 +292,17 @@ in }; }; + boot.systemd.packages = mkOption { + default = []; + type = types.listOf types.package; + description = "Packages providing systemd units."; + }; + boot.systemd.services = mkOption { - description = "Definition of systemd services."; default = {}; type = types.attrsOf types.optionSet; options = [ serviceOptions serviceConfig ]; + description = "Definition of systemd services."; }; boot.systemd.defaultUnit = mkOption {