Added forgejo, actual, and formatted some stuff
This commit is contained in:
parent
a6e1b359ef
commit
4e60d4fbc9
13 changed files with 293 additions and 130 deletions
46
moduler/services/actual/default.nix
Normal file
46
moduler/services/actual/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue