Added forgejo, actual, and formatted some stuff

This commit is contained in:
fwastring 2025-09-23 13:23:13 +02:00
parent a6e1b359ef
commit 4e60d4fbc9
13 changed files with 293 additions and 130 deletions

View file

@ -0,0 +1,46 @@
{
lib,
config,
...
}:
with lib;
{
options = {
actual = {
enable = mkEnableOption "enables Actual";
port = lib.mkOption {
type = lib.types.int;
default = 8001;
description = "The port that Actual is served on.";
};
hostname = lib.mkOption {
type = lib.types.str;
default = "localhost";
description = "The hostname that Actual is served on.";
};
};
};
config = mkMerge [
(mkIf config.actual.enable {
services = {
actual = {
enable = true;
openFirewall = true;
settings = {
port = config.actual.port;
hostname = config.actual.hostname;
};
};
nginx.virtualHosts."budget.wastring.com" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://${toString config.actual.hostname}:${toString config.actual.port}";
proxyWebsockets = true;
};
};
};
})
];
}