define selfprivacy.passthru option (type = types.submodule)

Stock NixOS passthru option cannot be defined in multiple places. But we
need to pass arbitrary parameters between SP modules.
This commit is contained in:
Alexander Tomokhov 2025-01-31 14:24:05 +04:00
parent 67a943c829
commit f1d2119f62

View file

@ -1,4 +1,4 @@
{ lib, ... }:
{ lib, pkgs, ... }:
with lib;
{
@ -139,5 +139,20 @@ with lib;
default = null;
};
};
################
# passthrough #
################
passthru = mkOption {
type = types.submodule {
freeformType = (pkgs.formats.json { }).type;
options = { };
};
default = { };
visible = false;
description = ''
This attribute allows to share data between modules.
You can put whatever you want here.
'';
};
};
}