1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-15 11:03:37 +03:00
mobile-nixos/modules/system-types/depthcharge.nix
2019-09-22 15:52:10 -04:00

26 lines
603 B
Nix

{ config, pkgs, lib, ... }:
let
device_config = config.mobile.device;
enabled = config.mobile.system.type == "depthcharge";
build = pkgs.callPackage ../../systems/depthcharge {
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 = {
inherit (build) disk-image kpart;
# installer shortcut; it's a depthcharge disk-image build.
mobile-installer = build.disk-image;
};
})
];
}