From f1d2119f62b7e4416790f02ac743418d6c75eddd Mon Sep 17 00:00:00 2001 From: Alexander Tomokhov Date: Fri, 31 Jan 2025 14:24:05 +0400 Subject: [PATCH] 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. --- selfprivacy-module.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/selfprivacy-module.nix b/selfprivacy-module.nix index 21fd25f..10c6b45 100644 --- a/selfprivacy-module.nix +++ b/selfprivacy-module.nix @@ -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. + ''; + }; }; }