Move Nix files back to the root of the project

This commit is contained in:
Oliver Davies 2025-03-29 23:19:06 +00:00
parent 52044d9995
commit 087153a16d
223 changed files with 12 additions and 12 deletions

View file

@ -0,0 +1,34 @@
{ config, lib, ... }:
with lib;
{
options.nixosModules.forgejo.enable = mkEnableOption "Enable forgejo";
config = mkIf config.nixosModules.forgejo.enable {
services = {
forgejo = {
enable = true;
group = "media";
stateDir = "/mnt/media/forgejo";
settings = {
server = {
DOMAIN = "forgejo.oliverdavies.uk";
HTTP_PORT = 2223;
};
service = {
DISABLE_REGISTRATION = true;
};
};
};
caddy.virtualHosts."${config.services.forgejo.settings.server.DOMAIN}" = {
useACMEHost = "oliverdavies.uk";
extraConfig = "reverse_proxy localhost:${toString config.services.forgejo.settings.server.HTTP_PORT}";
};
};
};
}