diff --git a/lib/combinators.nix b/lib/combinators.nix index 5e36640..2a9f87c 100644 --- a/lib/combinators.nix +++ b/lib/combinators.nix @@ -780,6 +780,8 @@ in rec { # deprecated persisthome = { deprecated = true; + sig = "Permission"; + doc = "This was reworked to store data under `~/.local/share/jail.nix` and renamed to [persist-home](#persist-home)."; __functor = _: name: lib.warn "persisthome is deprecated, use persist-home instead. When doing so, rename ~/.local/share/jails/${name} to ${helpers.dataDirSubPath "home/${name}"}" @@ -792,6 +794,8 @@ in rec { dbus-unsafe = { deprecated = true; + sig = "Permission"; + doc = "This was renamed to [unsafe-dbus](#unsafe-dbus)."; __functor = _: lib.warn "dbus-unsafe is deprecated, use unsafe-dbus instead" unsafe-dbus; diff --git a/website/flake.nix b/website/flake.nix index 9b86de2..0e57766 100644 --- a/website/flake.nix +++ b/website/flake.nix @@ -21,42 +21,50 @@ attrPos = builtins.unsafeGetAttrPos "__functor" combinatorObj; file = lib.removePrefix (toString ./..) attrPos.file; in '' - ## ${name} + ### ${name} **${name} :: ${combinatorObj.sig}** [Source](${repo.urls.file file attrPos.line}) ${combinatorObj.doc} - - --- ''; - combinatorDocs = lib.pipe - { + combinatorDocs = let + allCombinators = import ../lib/combinators.nix { pkgs = throw "Docs must not depend on pkgs"; lib = throw "Docs must not depend on lib"; helpers = throw "Docs must not depend on helpers"; - } - [ - (import ../lib/combinators.nix) - (lib.filterAttrs (_: v: !(v ? deprecated && v.deprecated))) - (lib.mapAttrsToList formatCombinatorDoc) - (lib.concatStringsSep "\n\n") - (docs: '' - # Combinators + }; - jail.nix combinators are the building blocks to create `Permission`s, - which grant a program specific permissions at runtime. + formatSection = filter: + lib.pipe allCombinators [ + (lib.filterAttrs (_: filter)) + (lib.mapAttrsToList formatCombinatorDoc) + (lib.concatStringsSep "\n\n---\n") + ]; - These permissions can be passed into the third argument to `jail` - funciton, as well as - [`basePermissions`](../advanced-configuration/#basepermissions). + hr = ''