diff --git a/data.nix b/data.nix index 8dd544f..c71691c 100644 --- a/data.nix +++ b/data.nix @@ -23,89 +23,44 @@ resources = { twitter = { name = "Twitter account"; - parts = [ - { - type = "account"; - website = "twitter.com"; - name = "nixos_org"; - } - ]; owner = "marketing"; + kind = "account"; + website = "https://twitter.com/nixos_org"; }; mastodon = { name = "Mastodon account"; - parts = [ - { - type = "account"; - website = "chaos.social"; - name = "nixos_org"; - } - ]; owner = "marketing"; + kind = "account"; + website = "https://mastodon.social/@nixos_org@chaos.social"; }; youtube = { name = "YouTube account"; - parts = [ - { - type = "account"; - website = "youtube.com"; - name = "NixOS-Foundation"; - } - ]; owner = "marketing"; + kind = "account"; + website = "https://www.youtube.com/@NixOS-Foundation"; }; opencollective = { name = "OpenCollective account"; - parts = [ - { - type = "account"; - website = "opencollective.com"; - name = "nixos"; - } - ]; owner = "foundation"; + kind = "account"; + website = "https://opencollective.com/nixos"; }; foundation = { name = "Legal foundation"; - parts = [ - { - type = "legal"; - website = "https://www.kvk.nl/"; - registrationNumber = "63520583"; - } - ]; owner = "foundation"; + kind = "legal"; + website = "https://www.kvk.nl/bestellen/#/63520583"; }; github = { name = "GitHub organisation"; - parts = [ - { - type = "account"; - website = "github.com"; - name = "NixOS"; - } - { - type = "account"; - website = "github.com"; - name = "NixCon"; - } - ]; owner = "github"; + kind = "account"; + website = "https://github.com/NixOS"; }; - infra = { - name = "Infrastructure"; - parts = [ - { - type = "GitHub"; - owner = "NixOS"; - repo = "infra"; - } - { - type = "DNS zone"; - zone = "nixos.org"; - } - ]; + "nixos.org" = { + name = "nixos.org DNS zone"; owner = "infra"; + kind = "account"; }; }; diff --git a/schema.nix b/schema.nix index 1ba9fcd..8acad44 100644 --- a/schema.nix +++ b/schema.nix @@ -20,12 +20,20 @@ in options.name = lib.mkOption { type = types.str; }; - options.parts = lib.mkOption { - type = types.listOf (types.attrsOf types.str); - }; options.owner = lib.mkOption { type = types.str; }; + options.kind = lib.mkOption { + type = types.enum [ "account" "legal" "GitHub" ]; + }; + options.website = lib.mkOption { + type = types.nullOr types.str; + default = null; + }; + options.extraInfo = lib.mkOption { + type = types.attrsOf types.str; + default = {}; + }; }); }; @@ -81,12 +89,7 @@ in Owner: [${config.teams.${resource.owner}.name}](#${toMarkdownAnchor config.teams.${resource.owner}.name}) - Parts: - ${lib.concatMapStrings (part: '' - - ${lib.concatStringsSep "\n " (lib.mapAttrsToList (name: value: - "${name}: ${value}" - ) part)} - '') resource.parts} + ${lib.optionalString (resource.website != null) "Website: ${resource.website}"} '') config.resources) }