mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 09:54:40 +02:00
services.finance: init module
This commit is contained in:
parent
146824d4ff
commit
4cedb5ba54
2 changed files with 46 additions and 0 deletions
|
@ -8,6 +8,7 @@
|
|||
./blackbox
|
||||
./blocky
|
||||
./dyndns
|
||||
./finance
|
||||
./freshrss
|
||||
./fritzbox
|
||||
./gitea
|
||||
|
|
45
modules/services/finance/default.nix
Normal file
45
modules/services/finance/default.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
# finance overview
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.services.finance;
|
||||
inherit (config.networking) domain;
|
||||
in
|
||||
{
|
||||
options.my.services.finance = with lib; {
|
||||
enable = lib.mkEnableOption "Finance firefly service.";
|
||||
|
||||
appKeyFile = mkOption {
|
||||
type = types.path;
|
||||
description = "appkey for the service.";
|
||||
example = "/run/secrets/freshrss";
|
||||
default = "base64:ICs6jizTJnu4U8Sl/+GKIUC6TSK+0i+Lu84CicRhTNE=";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.firefly-iii = {
|
||||
enable = true;
|
||||
virtualHost = "finance";
|
||||
enableNginx = true;
|
||||
settings = {
|
||||
APP_KEY_FILE = cfg.appKeyFile;
|
||||
SITE_OWNER = "server@buehler.rocks";
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."finance" = {
|
||||
serverName = "finance.${domain}";
|
||||
forceSSL = true;
|
||||
useACMEHost = domain;
|
||||
};
|
||||
|
||||
webapps.apps.finance = {
|
||||
dashboard = {
|
||||
name = "Finance";
|
||||
category = "app";
|
||||
icon = "coins";
|
||||
url = "https://finance.${domain}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue