From 2db4f7f0af42800aa7a9ae7fc70cd1f1a5d03dab Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 24 Aug 2015 13:21:42 +0200 Subject: lass 2 new-repos: allow secret collaborateurs --- lass/2configs/new-repos.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'lass/2configs/new-repos.nix') diff --git a/lass/2configs/new-repos.nix b/lass/2configs/new-repos.nix index 64e9a7f14..026f9a665 100644 --- a/lass/2configs/new-repos.nix +++ b/lass/2configs/new-repos.nix @@ -1,6 +1,7 @@ { config, lib, pkgs, ... }: with import ../../tv/4lib { inherit lib pkgs; }; + let out = { @@ -8,14 +9,14 @@ let enable = true; root-title = "public repositories at ${config.krebs.build.host.name}"; root-desc = "keep calm and engage"; - inherit repos rules; + repos = mapAttrs (_: s: removeAttrs s ["collaborators"]) repos; + rules = rules; }; }; - repos = mapAttrs (_: s: removeAttrs s ["collaborators"]) ( + repos = public-repos // - optionalAttrs config.krebs.build.host.secure restricted-repos - ); + optionalAttrs config.krebs.build.host.secure restricted-repos; rules = concatMap make-rules (attrValues repos); @@ -50,8 +51,8 @@ let }; }; - make-restricted-repo = name: { desc ? null, ... }: { - inherit name desc; + make-restricted-repo = name: { collaborators ? [], desc ? null, ... }: { + inherit name collaborators desc; public = false; }; -- cgit v1.2.3