diff options
author | lassulus <lassulus@lassul.us> | 2022-11-10 09:36:31 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2022-11-10 09:36:31 +0100 |
commit | 78d9448fcff61f666d2cdd03af9c8c80795f01f4 (patch) | |
tree | 5a430e09a8c1b6ae0d0902191168839e08cc6692 | |
parent | c6152351f876bda3db3cf07ac3541868114bdedf (diff) |
types: make deviceDependencies optional
-rw-r--r-- | types.nix | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -130,7 +130,7 @@ rec { create :: types.devices -> str */ create = devices: let - sortedDeviceList = diskoLib.sortDevicesByDependencies (diskoLib.meta devices).deviceDependencies devices; + sortedDeviceList = diskoLib.sortDevicesByDependencies ((diskoLib.meta devices).deviceDependencies or {}) devices; in '' set -efux ${concatStrings (map (dev: attrByPath (dev ++ [ "_create" ]) "" devices) sortedDeviceList)} @@ -141,7 +141,7 @@ rec { */ mount = devices: let fsMounts = diskoLib.deepMergeMap (dev: dev._mount.fs or {}) (flatten (map attrValues (attrValues devices))); - sortedDeviceList = diskoLib.sortDevicesByDependencies (diskoLib.meta devices).deviceDependencies devices; + sortedDeviceList = diskoLib.sortDevicesByDependencies ((diskoLib.meta devices).deviceDependencies or {}) devices; in '' set -efux # first create the neccessary devices |