From 1d70a55b2a7511086b6819946d672b353efe2301 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 19 Nov 2019 00:22:23 -0500 Subject: [PATCH] Generalize gitea module --- configuration.ao.nix | 10 ++++++++++ modules/services/gitea.nix | 12 ++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/configuration.ao.nix b/configuration.ao.nix index 85ae7981..3341a5cd 100644 --- a/configuration.ao.nix +++ b/configuration.ao.nix @@ -55,4 +55,14 @@ "dl.v0.io".email = "henrik@lissner.net"; "git.v0.io".email = "henrik@lissner.net"; }; + + services.gitea = { + appName = "V-NOUGHT"; + domain = "v0.io"; + rootUrl = "https://git.v0.io/"; + extraConfig = '' + [server] + SSH_DOMAIN = v0.io + ''; + }; } diff --git a/modules/services/gitea.nix b/modules/services/gitea.nix index 84e354be..1ebbee0b 100644 --- a/modules/services/gitea.nix +++ b/modules/services/gitea.nix @@ -1,6 +1,7 @@ { config, lib, pkgs, ... }: { + # I prefer git@... ssh addresses over gitea@... users.users.git = { useDefaultShell = true; home = "/var/lib/gitea"; @@ -11,19 +12,14 @@ enable = true; log.level = "Info"; - appName = "V-NOUGHT"; database = { user = "git"; type = "postgres"; }; - domain = "v0.io"; - rootUrl = "https://git.v0.io/"; - cookieSecure = true; useWizard = false; disableRegistration = true; - extraConfig = '' - [server] - SSH_DOMAIN = v0.io - ''; + + # We're assuming SSL-only connectivity + cookieSecure = true; }; }