2019-09-22 05:41:57 +03:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
device_config = config.mobile.device;
|
|
|
|
enabled = config.mobile.system.type == "depthcharge";
|
|
|
|
|
2019-09-22 22:52:10 +03:00
|
|
|
build = pkgs.callPackage ../../systems/depthcharge {
|
2019-09-22 05:41:57 +03:00
|
|
|
inherit device_config;
|
|
|
|
initrd = config.system.build.initrd;
|
|
|
|
system = config.system.build.rootfs;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
config = lib.mkMerge [
|
|
|
|
{ mobile.system.types = [ "depthcharge" ]; }
|
|
|
|
|
|
|
|
(lib.mkIf enabled {
|
|
|
|
system.build = {
|
2019-09-22 22:52:10 +03:00
|
|
|
inherit (build) disk-image kpart;
|
2019-09-22 05:41:57 +03:00
|
|
|
# installer shortcut; it's a depthcharge disk-image build.
|
2019-09-22 22:52:10 +03:00
|
|
|
mobile-installer = build.disk-image;
|
2019-09-22 05:41:57 +03:00
|
|
|
};
|
|
|
|
})
|
|
|
|
];
|
|
|
|
}
|