From d90af86251ad0778ab4d4991bfd803dc9affea79 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Thu, 22 Feb 2024 18:12:46 +0100 Subject: [PATCH] More data --- data.nix | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- schema.nix | 15 +++++---- 2 files changed, 98 insertions(+), 8 deletions(-) diff --git a/data.nix b/data.nix index a6e9d25..8dd544f 100644 --- a/data.nix +++ b/data.nix @@ -21,7 +21,79 @@ ''; resources = { + twitter = { + name = "Twitter account"; + parts = [ + { + type = "account"; + website = "twitter.com"; + name = "nixos_org"; + } + ]; + owner = "marketing"; + }; + mastodon = { + name = "Mastodon account"; + parts = [ + { + type = "account"; + website = "chaos.social"; + name = "nixos_org"; + } + ]; + owner = "marketing"; + }; + youtube = { + name = "YouTube account"; + parts = [ + { + type = "account"; + website = "youtube.com"; + name = "NixOS-Foundation"; + } + ]; + owner = "marketing"; + }; + opencollective = { + name = "OpenCollective account"; + parts = [ + { + type = "account"; + website = "opencollective.com"; + name = "nixos"; + } + ]; + owner = "foundation"; + }; + foundation = { + name = "Legal foundation"; + parts = [ + { + type = "legal"; + website = "https://www.kvk.nl/"; + registrationNumber = "63520583"; + } + ]; + owner = "foundation"; + }; + github = { + name = "GitHub organisation"; + parts = [ + { + type = "account"; + website = "github.com"; + name = "NixOS"; + } + { + type = "account"; + website = "github.com"; + name = "NixCon"; + } + ]; + owner = "github"; + }; infra = { + name = "Infrastructure"; parts = [ { type = "GitHub"; @@ -38,6 +110,20 @@ }; teams = { + github = { + name = "GitHub organisation owners"; + description = '' + This team is responsible for the GitHub organisation account. + ''; + homepage = "https://github.com/NixOS"; + matrixRoom = null; + leader = "zimbatm"; + members = [ + "zimbatm" + "edolstra" + # ... + ]; + }; infra = { #level = "resource"; name = "Infra team"; @@ -67,8 +153,9 @@ ''; homepage = "https://github.com/NixOS/foundation"; matrixRoom = "#foundation:nixos.org"; + leader = null; members = [ - "eelco" + "edolstra" ]; }; @@ -114,7 +201,7 @@ }; people = { - eelco = { + edolstra = { name = "Eelco Dolstra"; github = "edolstra"; email = "edolstra@gmail.com"; diff --git a/schema.nix b/schema.nix index ea81c11..1ba9fcd 100644 --- a/schema.nix +++ b/schema.nix @@ -17,6 +17,9 @@ in options.resources = lib.mkOption { type = types.attrsOf (types.submodule { + options.name = lib.mkOption { + type = types.str; + }; options.parts = lib.mkOption { type = types.listOf (types.attrsOf types.str); }; @@ -39,10 +42,9 @@ in }; options.leader = lib.mkOption { type = types.nullOr types.str; - default = null; }; options.matrixRoom = lib.mkOption { - type = types.str; + type = types.nullOr types.str; }; options.homepage = lib.mkOption { type = types.str; @@ -74,10 +76,10 @@ in ## Resources ${ - lib.concatStrings (lib.mapAttrsToList (name: resource: '' - ### ${name} + lib.concatStrings (lib.mapAttrsToList (id: resource: '' + ### ${resource.name} - Owner: [${resource.owner}](#${toMarkdownAnchor config.teams.${resource.owner}.name}) + Owner: [${config.teams.${resource.owner}.name}](#${toMarkdownAnchor config.teams.${resource.owner}.name}) Parts: ${lib.concatMapStrings (part: '' @@ -100,7 +102,8 @@ in Homepage: ${team.homepage} - Matrix room: [${team.matrixRoom}](https://matrix.to/#/${team.matrixRoom}) + ${lib.optionalString (team.matrixRoom != null) '' + Matrix room: [${team.matrixRoom}](https://matrix.to/#/${team.matrixRoom})''} Members: ${lib.concatMapStrings (member: ''