From 84833ba0f85a0064323c2a2032c9e7f71c9f37d3 Mon Sep 17 00:00:00 2001
From: NullBite <me@nullbite.com>
Date: Mon, 18 Mar 2024 20:24:00 -0400
Subject: [PATCH] switch nixfiles-assets to GitHub

this also configures Nix to keep nixfiles-assets in the store so it
doesn't get redownloaded and I can save some GitHub LFS bandwidth
---
 flake.lock            | 12 ++++++------
 flake.nix             |  5 +++--
 system/common/nix.nix | 10 ++++++++++
 3 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/flake.lock b/flake.lock
index 5c3d11b..d2aaa1d 100644
--- a/flake.lock
+++ b/flake.lock
@@ -291,15 +291,15 @@
       "locked": {
         "lastModified": 1710743555,
         "narHash": "sha256-e8iXy4hCLYegNTeyB/GB8hj+gj1wPD+b+XOsEcdfEJY=",
-        "ref": "refs/heads/main",
+        "owner": "Silveere",
+        "repo": "nixfiles-assets",
         "rev": "4ee66c3036eda78fe0ddada0e289a4f672ac4f57",
-        "revCount": 1,
-        "type": "git",
-        "url": "https://gitea.protogen.io/nullbite/nixfiles-assets"
+        "type": "github"
       },
       "original": {
-        "type": "git",
-        "url": "https://gitea.protogen.io/nullbite/nixfiles-assets"
+        "owner": "Silveere",
+        "repo": "nixfiles-assets",
+        "type": "github"
       }
     },
     "nixpkgs": {
diff --git a/flake.nix b/flake.nix
index dcade92..fa21f1b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -49,8 +49,9 @@
 
     nixfiles-assets = {
       # using self-hosted gitea mirror because of GitHub LFS bandwidth limit (even though i'd probably never hit it)
-      type = "git";
-      url = "https://gitea.protogen.io/nullbite/nixfiles-assets";
+      type = "github";
+      owner = "Silveere";
+      repo = "nixfiles-assets";
       inputs.nixpkgs.follows = "nixpkgs";
       inputs.systems.follows = "systems";
     };
diff --git a/system/common/nix.nix b/system/common/nix.nix
index 85ed363..7e45398 100644
--- a/system/common/nix.nix
+++ b/system/common/nix.nix
@@ -26,6 +26,16 @@ in
 
       # this makes modern nix tools use the system's version of nixpkgs
       nix.registry = {
+        # this keeps nixfiles-assets in the store so i can save some GitHub LFS
+        # bandwidth
+        nixfiles-assets = {
+          exact = true;
+          from = {
+            id = "nixfiles-assets";
+            type = "indirect";
+          };
+          flake = inputs.nixfiles-assets;
+        };
         nixpkgs = {
           exact = true;
           from = {