mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-11-30 11:03:20 +03:00
36 lines
843 B
Nix
36 lines
843 B
Nix
# Generated filesystems, contrary to filesystems on a configured system.
|
|
#
|
|
# This contains the machinery to produce filesystem images.
|
|
{ config, lib, pkgs, ...}:
|
|
|
|
let
|
|
inherit (lib)
|
|
mapAttrs
|
|
mkOption
|
|
types
|
|
;
|
|
in
|
|
{
|
|
options = {
|
|
mobile.generatedFilesystems = mkOption {
|
|
type = types.attrsOf (pkgs.image-builder.types.filesystem-image);
|
|
description = lib.mdDoc ''
|
|
Filesystem definitions that will be created at build.
|
|
'';
|
|
};
|
|
mobile.outputs.generatedFilesystems = mkOption {
|
|
type = with types; attrsOf package;
|
|
internal = true;
|
|
description = lib.mdDoc ''
|
|
All generated filesystems from the build.
|
|
'';
|
|
};
|
|
};
|
|
|
|
config = {
|
|
mobile.outputs.generatedFilesystems =
|
|
mapAttrs (name: config: config.output) config.mobile.generatedFilesystems
|
|
;
|
|
};
|
|
}
|