From 619d80dd7b10086540c9803f16a4479fa6cfb0f9 Mon Sep 17 00:00:00 2001 From: jolheiser Date: Sun, 14 Jul 2024 22:50:27 -0500 Subject: [PATCH] feat: git-pr Signed-off-by: jolheiser --- flake.lock | 21 +++++++++++++++++++++ flake.nix | 5 +++++ machines/dragonwell/caddy.nix | 3 +++ machines/dragonwell/default.nix | 2 +- machines/dragonwell/git-pr.nix | 19 +++++++++++++++++++ 5 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 machines/dragonwell/git-pr.nix diff --git a/flake.lock b/flake.lock index b8cd182..8c99c63 100644 --- a/flake.lock +++ b/flake.lock @@ -234,6 +234,26 @@ "url": "https://git.jolheiser.com/git-age.git" } }, + "git-pr": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1721014718, + "narHash": "sha256-VwiuhbFL4GjGyDQpO7eYHAfjl+LOhGqjUAbaHOR78VM=", + "ref": "refs/heads/main", + "rev": "b8fc91752953cddb92daf9e08de0b27bd4731d3d", + "revCount": 1, + "type": "git", + "url": "https://git.jolheiser.com/git-pr-nix.git" + }, + "original": { + "type": "git", + "url": "https://git.jolheiser.com/git-pr-nix.git" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -507,6 +527,7 @@ "flake-utils": "flake-utils", "gist": "gist", "git-age": "git-age", + "git-pr": "git-pr", "golink": "golink", "gomodinit": "gomodinit", "helix": "helix", diff --git a/flake.nix b/flake.nix index 1796c1c..d7a74e8 100644 --- a/flake.nix +++ b/flake.nix @@ -81,6 +81,10 @@ url = "git+https://git.jolheiser.com/ugit.git"; inputs.nixpkgs.follows = "nixpkgs"; }; + git-pr = { + url = "git+https://git.jolheiser.com/git-pr-nix.git"; + inputs.nixpkgs.follows = "nixpkgs"; + }; # Other flakes golink = { url = "github:tailscale/golink"; @@ -232,6 +236,7 @@ inputs.agenix.nixosModules.default inputs.golink.nixosModules.default inputs.ugit.nixosModules.default + inputs.git-pr.nixosModules.default ./machines/dragonwell ]; }; diff --git a/machines/dragonwell/caddy.nix b/machines/dragonwell/caddy.nix index be1a04a..a5868fb 100644 --- a/machines/dragonwell/caddy.nix +++ b/machines/dragonwell/caddy.nix @@ -55,6 +55,9 @@ in { "git.jolheiser.com".extraConfig = '' reverse_proxy localhost:8449 ''; + "pr.jolheiser.com".extraConfig = '' + reverse_proxy localhost:7449 + ''; "social.jolheiser.com".extraConfig = '' reverse_proxy localhost:4686 ''; diff --git a/machines/dragonwell/default.nix b/machines/dragonwell/default.nix index 9ba2714..f83dbeb 100644 --- a/machines/dragonwell/default.nix +++ b/machines/dragonwell/default.nix @@ -2,7 +2,7 @@ let username = "jolheiser"; key = ''ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfKqCWtDlS3tgvfT6hQN+ii8UtabIZ+ZNmYN+bLwIa8PHOEW5MbfaqXSlhKkSi4+7SfQDCHphw0SMfhsQ4qMEcoywZ+4niDgKlQEVkl+S/VGbLuPe92NRStkyreZBLPr3Rh7ScNlGHcmHmoV9v7725fMnsMmabGVhpGO84PwNHOfJyv2tx2h6LxFbAV8S44UQu2lc8YLWCK2UvKuRnBerBXLnDQThUUX8UuCFzb786gQzD5XDU0MENbByxiy0XdVGAC+tFXEiSIgFZlFbFYyShgdTP9MzX2MOglEi+ae+1UIFncraW7ptUey7qHFJylpHWWWvE+GTwsg2G50i0FvFj jolheiser@jolheiser''; in { - imports = [./caddy.nix ./dex.nix ./golink.nix ./gotosocial.nix ./restic.nix ./tandoor.nix ./ugit.nix ./vikunja.nix ./hardware.nix]; + imports = [./caddy.nix ./dex.nix ./git-pr.nix ./golink.nix ./gotosocial.nix ./restic.nix ./tandoor.nix ./ugit.nix ./vikunja.nix ./hardware.nix]; boot.tmp.cleanOnBoot = true; zramSwap.enable = true; diff --git a/machines/dragonwell/git-pr.nix b/machines/dragonwell/git-pr.nix new file mode 100644 index 0000000..4994ddb --- /dev/null +++ b/machines/dragonwell/git-pr.nix @@ -0,0 +1,19 @@ +{ + services.git-pr = { + enable = true; + openFirewall = true; + url = "pr.jolheiser.com"; + admins = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAMAN5+UcBIQ5jQgd74yabfQRCfMToFNAfmU6M5MmFSb3C1Txkdr2lPeaev5enTm70mWrFYs2FC3oA0nWHvkxoBKzYmhRiRGPJ/6VQVaZbQP1j3MFKosCIXzN0GqVb5VPz/4jjX5hW2HWtyf4XID63rHJLmD0lwJVfxsue/wftTaSqNeCZjC9jNuDB+vlJRHsvLfk1ssiQ6V2508ZgImHG/LuS/WpMsd8zvI2vqZh4nVr9Bmc8U2B5KtOOcT/HpKRBfGPRTJyQ+vgqIx96J8ah5eK19jO/nTKiqobMkIgPiXkKyZa+Z5NzMe728sL6eTfWRimbU+sVSizVtvDdkSfx"]; + sshPort = 7448; + enableWeb = true; + webPort = 7449; + theme = "catppuccin-mocha"; + repos = [ + { + id = "ugit"; + cloneAddr = "https://git.jolheiser.com/ugit.git"; + desc = "Minimal git service"; + } + ]; + }; +}