diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-08-21 11:28:47 -0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-08-21 11:28:47 -0400 |
commit | 223f04b3caecf2e52a9ad98abefb2a6f44cd811e (patch) | |
tree | daa4d2fbb67eb0bc815a0d593daab0f528dd52e6 /modules/system/boot/systemd.nix | |
parent | e02b57df9b54380e94a18df7276b1ff3cbe42f06 (diff) | |
download | nixpkgs-223f04b3caecf2e52a9ad98abefb2a6f44cd811e.tar nixpkgs-223f04b3caecf2e52a9ad98abefb2a6f44cd811e.tar.gz nixpkgs-223f04b3caecf2e52a9ad98abefb2a6f44cd811e.tar.bz2 nixpkgs-223f04b3caecf2e52a9ad98abefb2a6f44cd811e.tar.lz nixpkgs-223f04b3caecf2e52a9ad98abefb2a6f44cd811e.tar.xz nixpkgs-223f04b3caecf2e52a9ad98abefb2a6f44cd811e.tar.zst nixpkgs-223f04b3caecf2e52a9ad98abefb2a6f44cd811e.zip |
Add option ‘boot.systemd.packages’ to use units from the specified packages
Diffstat (limited to 'modules/system/boot/systemd.nix')
-rw-r--r-- | modules/system/boot/systemd.nix | 12 |
1 files changed, 11 insertions, 1 deletions
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 { |