From 0bf8a8e97c87050573e1cc7ee8d95a54524b7b04 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 12 Nov 2024 11:27:42 +0100 Subject: [PATCH] cluster/services/flake-registry: init --- cluster/services/flake-reegistry/default.nix | 36 +++++++++++++++++++ .../services/flake-reegistry/extra-flakes.nix | 18 ++++++++++ 2 files changed, 54 insertions(+) create mode 100644 cluster/services/flake-reegistry/default.nix create mode 100644 cluster/services/flake-reegistry/extra-flakes.nix diff --git a/cluster/services/flake-reegistry/default.nix b/cluster/services/flake-reegistry/default.nix new file mode 100644 index 0000000..d5550a5 --- /dev/null +++ b/cluster/services/flake-reegistry/default.nix @@ -0,0 +1,36 @@ +{ lib, ... }: + +{ + ways.registry.static = { depot, pkgs, ... }: pkgs.writeTextDir "flake-registry.json" (let + flakes = { + depot = { + type = "tarball"; + url = "https://forge.${depot.lib.meta.domain}/${depot.lib.meta.domain}/depot/archive/master.tar.gz"; + }; + depot-nixpkgs = { + type = "github"; + owner = "NixOS"; + repo = "nixpkgs"; + inherit (depot.inputs.nixpkgs.sourceInfo) rev narHash lastModified; + }; + blank = { + type = "github"; + owner = "divnix"; + repo = "blank"; + inherit (depot.inputs.blank.sourceInfo) rev narHash lastModified; + }; + } // import ./extra-flakes.nix; + in builtins.toJSON { + version = 2; + flakes = lib.pipe flakes [ + (lib.attrsToList) + (map (f: { + from = { + type = "indirect"; + id = f.name; + }; + to = f.value; + })) + ]; + }); +} diff --git a/cluster/services/flake-reegistry/extra-flakes.nix b/cluster/services/flake-reegistry/extra-flakes.nix new file mode 100644 index 0000000..d9236e5 --- /dev/null +++ b/cluster/services/flake-reegistry/extra-flakes.nix @@ -0,0 +1,18 @@ +let + github = owner: repo: { + type = "github"; + inherit owner repo; + }; +in { + # own + hyprspace = github "hyprspace" "hyprspace"; + ai = github "nixified-ai" "flake"; + nix-super = github "privatevoid-net" "nix-super"; + nixpak = github "nixpak" "nixpak"; + + # other + nix = github "NixOS" "nix"; + flake-parts = github "hercules-ci" "flake-parts"; + home-manager = github "nix-community" "home-manager"; + dream2nix = github "nix-community" "dream2nix"; +}