diff --git a/default.nix b/default.nix
new file mode 100644
index 0000000..fed5a34
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,26 @@
+{
+ lib,
+ fetchurl,
+ callPackage,
+ pkgs,
+}:
+
+callPackage (import (pkgs.path + "/pkgs/applications/version-management/cgit/common.nix") rec {
+ pname = "cgit-magenta";
+ version = "1.4.1";
+
+ src = ./.;
+ # cgit-pink is tightly coupled with git and needs a git source tree to build.
+ # IMPORTANT: Remember to check which git version cgit-pink needs on every
+ # version bump (look for "GIT_VER" in the top-level Makefile).
+ gitSrc = fetchurl {
+ url = "mirror://kernel/software/scm/git/git-2.36.1.tar.xz";
+ sha256 = "0w43a35mhc2qf2gjkxjlnkf2lq8g0snf34iy5gqx2678yq7llpa0";
+ };
+
+ homepage = "https://cgit.rory.gay/cgit-magenta.git/about/";
+ description = "cgit fork aiming for better maintenance (again)";
+ #maintainers = with lib.maintainers; [ sternenseemann ];
+ maintainers = [];
+}) { }
+
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000..323bf19
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,132 @@
+{
+ "nodes": {
+ "flake-utils": {
+ "inputs": {
+ "systems": "systems"
+ },
+ "locked": {
+ "lastModified": 1731533236,
+ "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "home-manager": {
+ "inputs": {
+ "nixpkgs": "nixpkgs"
+ },
+ "locked": {
+ "lastModified": 1741701235,
+ "narHash": "sha256-gBlb8R9gnjUAT5XabJeel3C2iEUiBHx3+91651y3Sqo=",
+ "owner": "nix-community",
+ "repo": "home-manager",
+ "rev": "c630dfa8abcc65984cc1e47fb25d4552c81dd37e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "ref": "master",
+ "repo": "home-manager",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1741379970,
+ "narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "36fd87baa9083f34f7f5027900b62ee6d09b1f2f",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs_2": {
+ "locked": {
+ "lastModified": 1741513245,
+ "narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs_3": {
+ "locked": {
+ "lastModified": 1731763621,
+ "narHash": "sha256-ddcX4lQL0X05AYkrkV2LMFgGdRvgap7Ho8kgon3iWZk=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "c69a9bffbecde46b4b939465422ddc59493d3e4d",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixpkgs-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "flake-utils": "flake-utils",
+ "home-manager": "home-manager",
+ "nixpkgs": "nixpkgs_2",
+ "sops-nix": "sops-nix"
+ }
+ },
+ "sops-nix": {
+ "inputs": {
+ "nixpkgs": "nixpkgs_3"
+ },
+ "locked": {
+ "lastModified": 1741644481,
+ "narHash": "sha256-E0RrMykMtEv15V3QhpsFutgoSKhL1JBhidn+iZajOyg=",
+ "owner": "Mic92",
+ "repo": "sops-nix",
+ "rev": "e653d71e82575a43fe9d228def8eddb73887b866",
+ "type": "github"
+ },
+ "original": {
+ "owner": "Mic92",
+ "repo": "sops-nix",
+ "type": "github"
+ }
+ },
+ "systems": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/flake.nix b/flake.nix
new file mode 100755
index 0000000..cd4d6b1
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,30 @@
+{
+ description = "cgit-magenta, maintained by Rory&";
+
+ inputs = {
+ nixpkgs = {
+ url = "github:NixOS/nixpkgs/nixos-unstable";
+ };
+
+ # Base modules
+ home-manager.url = "github:nix-community/home-manager/master";
+ sops-nix.url = "github:Mic92/sops-nix";
+ flake-utils.url = "github:numtide/flake-utils";
+ };
+
+ outputs =
+ inputs:
+ with inputs;
+ (
+ flake-utils.lib.eachSystem flake-utils.lib.allSystems (
+ system:
+ let
+ pkgs = import nixpkgs { inherit system; };
+ in
+ {
+ packages.default = (
+ pkgs.callPackage ./default.nix { }
+ );
+ }
+ ));
+}
|