83405b6dd2
GitOrigin-RevId: ac718d02867a84b42522a0ece52d841188208f2c
49 lines
732 B
Nix
49 lines
732 B
Nix
{ lib, ... }:
|
|
let
|
|
inherit (lib) mkOption types;
|
|
|
|
moduleWithoutKey = {
|
|
config = {
|
|
raw = "pear";
|
|
};
|
|
};
|
|
|
|
moduleWithKey = {
|
|
key = __curPos.file + "#moduleWithKey";
|
|
config = {
|
|
raw = "pear";
|
|
};
|
|
};
|
|
|
|
decl = {
|
|
options = {
|
|
raw = mkOption {
|
|
type = types.lines;
|
|
};
|
|
};
|
|
};
|
|
in
|
|
{
|
|
options = {
|
|
once = mkOption {
|
|
type = types.submodule {
|
|
imports = [
|
|
decl
|
|
moduleWithKey
|
|
moduleWithKey
|
|
];
|
|
};
|
|
default = {};
|
|
};
|
|
twice = mkOption {
|
|
type = types.submodule {
|
|
imports = [
|
|
decl
|
|
moduleWithoutKey
|
|
moduleWithoutKey
|
|
];
|
|
};
|
|
default = {};
|
|
};
|
|
};
|
|
}
|