nix-openwrt-imagebuilder/lib/modules/system.nix

33 lines
704 B
Nix
Raw Normal View History

2022-06-23 03:32:09 +02:00
{ config, lib, pkgs, profiles, ... }:
let cfg = config.system;
in {
options.system = with lib; {
2022-06-23 03:32:09 +02:00
settings = mkOption {
default = { };
type = types.uciSection;
description = ''
See <link xlink:href="https://openwrt.org/docs/guide-user/base-system/system_configuration"/>'';
};
2022-06-23 03:32:09 +02:00
build = mkOption {
default = { };
description = ''
Attribute set of derivations used to construct the system.
'';
type = types.submoduleWith {
modules =
[{ freeformType = with types; lazyAttrsOf (uniq unspecified); }];
2022-06-23 03:32:09 +02:00
};
};
};
config.uci.settings.system."" = {
type = "system";
inherit (cfg) settings;
};
2022-06-23 03:32:09 +02:00
}