summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/firefly_iii.nix32
-rw-r--r--services/kanboard.nix63
2 files changed, 50 insertions, 45 deletions
diff --git a/services/firefly_iii.nix b/services/firefly_iii.nix
index 1f9bd64..e0f17c5 100644
--- a/services/firefly_iii.nix
+++ b/services/firefly_iii.nix
@@ -28,16 +28,16 @@ in
};
config = mkIf cfg.enable {
services.nginx.virtualHosts = {
- ${cfg.domain} = {
- enableACME = lib.mkForce false;
- addSSL = lib.mkForce false;
- forceSSL = lib.mkForce false;
- };
- ${cfg.importer-domain} = {
- enableACME = lib.mkForce false;
- addSSL = lib.mkForce false;
- forceSSL = lib.mkForce false;
- };
+ ${cfg.domain} = {
+ enableACME = lib.mkForce false;
+ addSSL = lib.mkForce false;
+ forceSSL = lib.mkForce false;
+ };
+ ${cfg.importer-domain} = {
+ enableACME = lib.mkForce false;
+ addSSL = lib.mkForce false;
+ forceSSL = lib.mkForce false;
+ };
};
users.users."firefly_iii" = {
isSystemUser = true;
@@ -63,8 +63,8 @@ in
allowedUsers = [ "firefly_iii" ];
};
users.firefly_iii = {
- sopsPlaceholder = config.sops.placeholder."firefly_iii/db_password";
- host = "localhost";
+ sopsPlaceholder = config.sops.placeholder."firefly_iii/db_password";
+ host = "localhost";
};
};
services.firefly-iii = {
@@ -80,10 +80,10 @@ in
# DB
DB_CONNECTION = "mysql";
DB_DATABASE = "firefly_iii";
- DB_HOST = "localhost";
- DB_PORT = config.services.mysql.settings.mysqld.port;
- DB_USERNAME = "firefly_iii";
- DB_PASSWORD = config.sops.secrets."firefly_iii/db_password".path;
+ DB_HOST = "localhost";
+ DB_PORT = config.services.mysql.settings.mysqld.port;
+ DB_USERNAME = "firefly_iii";
+ DB_PASSWORD = config.sops.secrets."firefly_iii/db_password".path;
# Proxying
TRUSTED_PROXIES = "192.168.80.100";
diff --git a/services/kanboard.nix b/services/kanboard.nix
index c19b673..6c7f0eb 100644
--- a/services/kanboard.nix
+++ b/services/kanboard.nix
@@ -1,57 +1,62 @@
-{pkgs, config, lib, ...}:
- let
- cfg = config.wilkuu.services.kanboard;
- inherit (lib) mkEnableOption mkOption types mkIf;
- in
+{ config, lib, ... }:
+let
+ cfg = config.wilkuu.services.kanboard;
+ inherit (lib)
+ mkEnableOption
+ mkOption
+ types
+ mkIf
+ ;
+in
{
options.wilkuu.services.kanboard = {
- enable = mkEnableOption "kanboard";
+ enable = mkEnableOption "kanboard";
domain = mkOption {
- type = types.str;
+ type = types.str;
example = "kb.wilkuu.xyz";
};
- };
+ };
config = mkIf cfg.enable {
- wilkuu.services.mysql.unix_users = ["kanboard"];
- wilkuu.mjmap = {
- enable = lib.mkDefault true;
- users = ["kanboard"];
- };
+ wilkuu.services.mysql.unix_users = [ "kanboard" ];
+ wilkuu.mjmap = {
+ enable = lib.mkDefault true;
+ users = [ "kanboard" ];
+ };
sops.secrets."kanboard/db_password" = {
- sopsFile = ../secrets/${config.networking.hostName}/kanboard.yaml;
- owner = "kanboard";
- mode = "500";
- };
+ sopsFile = ../secrets/${config.networking.hostName}/kanboard.yaml;
+ owner = "kanboard";
+ mode = "500";
+ };
sops.templates."kanboard-env" = {
content = ''
DB_PASSWORD=${config.sops.placeholder."kanboard/db_password"}
PLUGIN_INSTALLER=true
- '';
- owner = "kanboard";
- mode = "500";
+ '';
+ owner = "kanboard";
+ mode = "500";
};
systemd.services.phpfpm-kanboard.serviceConfig = {
- EnvironmentFile = config.sops.templates."kanboard-env".path;
- };
+ EnvironmentFile = config.sops.templates."kanboard-env".path;
+ };
services.kanboard = {
nginx = {
enableACME = false;
forceSSL = false;
- addSSL = false;
+ addSSL = false;
};
- domain = cfg.domain;
- enable = true;
+ domain = cfg.domain;
+ enable = true;
settings = {
PLUGIN_INSTALLER = "$PLUGIN_INSTALLER";
PLUGINS_DIR = "${config.services.kanboard.dataDir}/plugins";
- MAIL_FROM = "Kanboard <noreply@wilkuu.nl>";
+ MAIL_FROM = "Kanboard <noreply@wilkuu.nl>";
MAIL_TRANSPORT = "sendmail";
MAIL_SENDMAIL_COMMAND = "sendmail";
- DB_DRIVER = "mysql";
- DB_USERNAME = "kanboard";
+ DB_DRIVER = "mysql";
+ DB_USERNAME = "kanboard";
DB_HOSTNAME = "127.0.0.1;unix_socket=/run/mysqld/mysqld.sock";
- DB_PASSWORD = "$DB_PASSWORD";
+ DB_PASSWORD = "$DB_PASSWORD";
ENABLE_URL_REWRITE = true;
TRUSTED_PROXY_HEADERS = "HOST,X-REAL-IP,X-FORWARDED-FOR,X-FORWARDED-HOST,X-FORWARDED-SERVER";
TRUSTED_PROXY_NETWORKS = "192.168.80.0/24,192.168.88.0/24";