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; with lib;
{ {
@@ -139,5 +139,20 @@ with lib;
default = null; 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.
'';
};
}; };
} }