From f6d2de3115d812c7a337ae1152e5709d81a2c62f Mon Sep 17 00:00:00 2001
From: Tom Hubrecht <tom.hubrecht@dgnum.eu>
Date: Tue, 17 Dec 2024 00:14:01 +0100
Subject: [PATCH] chore(patches): Drop patches from nixos-24.05 as only web02
 and ap01 use it

---
 REUSE.toml                             |  2 +-
 default.nix                            |  1 -
 patches/default.nix                    | 46 --------------------------
 patches/nixpkgs/04-crabfit-karla.patch | 24 --------------
 4 files changed, 1 insertion(+), 72 deletions(-)
 delete mode 100644 patches/nixpkgs/04-crabfit-karla.patch

diff --git a/REUSE.toml b/REUSE.toml
index e5d3af8..8219952 100644
--- a/REUSE.toml
+++ b/REUSE.toml
@@ -20,7 +20,7 @@ precedence = "closest"
 [[annotations]]
 SPDX-FileCopyrightText = "2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>"
 SPDX-License-Identifier = "EUPL-1.2"
-path = ["machines/nixos/compute01/librenms/kanidm.patch", "machines/nixos/compute01/stirling-pdf/*.patch", "machines/nixos/vault01/k-radius/packages/01-python_path.patch", "machines/nixos/web01/crabfit/*.patch", "machines/nixos/web02/cas-eleves/01-pytest-cas.patch", "patches/lix/01-disable-installChecks.patch", "patches/nixpkgs/03-crabfit-karla.patch", "patches/nixpkgs/04-crabfit-karla.patch", "patches/nixpkgs/05-netbird-relay.patch"]
+path = ["machines/nixos/compute01/librenms/kanidm.patch", "machines/nixos/compute01/stirling-pdf/*.patch", "machines/nixos/vault01/k-radius/packages/01-python_path.patch", "machines/nixos/web01/crabfit/*.patch", "machines/nixos/web02/cas-eleves/01-pytest-cas.patch", "patches/lix/01-disable-installChecks.patch", "patches/nixpkgs/03-crabfit-karla.patch", "patches/nixpkgs/05-netbird-relay.patch"]
 precedence = "closest"
 
 [[annotations]]
diff --git a/default.nix b/default.nix
index 85df664..0cbd84e 100644
--- a/default.nix
+++ b/default.nix
@@ -92,7 +92,6 @@ let
           "machines/nixos/web02/cas-eleves/01-pytest-cas.patch"
           "patches/lix/01-disable-installChecks.patch"
           "patches/nixpkgs/03-crabfit-karla.patch"
-          "patches/nixpkgs/04-crabfit-karla.patch"
           "patches/nixpkgs/05-netbird-relay.patch"
         ];
         copyright = "2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>";
diff --git a/patches/default.nix b/patches/default.nix
index 403c881..4f2819f 100644
--- a/patches/default.nix
+++ b/patches/default.nix
@@ -14,52 +14,6 @@ in
     (local ./lix/01-disable-installChecks.patch)
   ];
 
-  "nixos-24.05" = [
-    (local ./nixpkgs/06-netbox-qrcode.patch)
-
-    # nixos/nextcloud: Rename autocreate (a no-op) to verify_bucket_exists
-    {
-      id = "275165";
-      hash = "sha256-9a26V3Pi8yLD3N9+mC1kvJoruxRTp/qOHapnt6VX7pw=";
-    }
-
-    # karla: init at 2.004
-    {
-      _type = "commit";
-      sha = "7c51104112e8ea0e2ac53bf7d535e677f7686a9e";
-      hash = "sha256-1TBLzZkvkFhCL8RYVVIUhTyrH3+X1iJIMkyHffmrOWc=";
-    }
-
-    # Crabfit: don't depend on all google-fonts
-    (local ./nixpkgs/04-crabfit-karla.patch)
-
-    # nixos/kanidm: add basic provisioning
-    {
-      id = 251598;
-      excludes = [ "pkgs/by-name/ka/kanidm/package.nix" ];
-      hash = "sha256-z4b1ljwapfj4KpXEEAMmhYKogstKtURyq+hoJcfEXiw=";
-    }
-
-    # kanidm-provision: 1.1.1 -> 1.1.2
-    {
-      id = 336836;
-      hash = "sha256-4ihpxYdLp559RIcKRC6GPt5flLCohFiPGp0k9h1s1hs=";
-    }
-
-    # nixos/kanidm: fix systemd service type
-    {
-      id = 337527;
-      excludes = [ ".git-blame-ignore-revs" ];
-      hash = "sha256-ca7CsPuWJqucC77ejsvoDAt+wxWLUP30IdXtZQVQrko=";
-    }
-
-    # Add Collabora Online
-    {
-      id = 330708;
-      hash = "sha256-655zkmch5VLXEUzhT6+b7QpywslDoIMZ8mY0II55Wlw=";
-    }
-  ];
-
   "nixos-24.11" = [
     # nixos/nextcloud: Rename autocreate (a no-op) to verify_bucket_exists
     {
diff --git a/patches/nixpkgs/04-crabfit-karla.patch b/patches/nixpkgs/04-crabfit-karla.patch
deleted file mode 100644
index 366928a..0000000
--- a/patches/nixpkgs/04-crabfit-karla.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git a/pkgs/by-name/cr/crabfit-frontend/package.nix b/pkgs/by-name/cr/crabfit-frontend/package.nix
-index 99d7be0fdeae..9f858e8a9a9e 100644
---- a/pkgs/by-name/cr/crabfit-frontend/package.nix
-+++ b/pkgs/by-name/cr/crabfit-frontend/package.nix
-@@ -8,7 +8,7 @@
-   nodejs,
-   yarn,
-   fixup_yarn_lock,
--  google-fonts,
-+  karla,
-   api_url ? "http://127.0.0.1:3000",
-   frontend_url ? "crab.fit",
- }:
-@@ -83,9 +83,7 @@ stdenv.mkDerivation (finalAttrs: {
-     patchShebangs node_modules
- 
-     mkdir -p src/app/fonts
--    cp "${
--      google-fonts.override { fonts = [ "Karla" ]; }
--    }/share/fonts/truetype/Karla[wght].ttf" src/app/fonts/karla.ttf
-+    cp "${karla}/share/fonts/truetype/Karla-Regular.ttf" src/app/fonts/karla.ttf
- 
-     runHook postConfigure
-   '';