2024-10-23 23:58:08 +02:00
|
|
|
{ config, pkgs, ... }:
|
2023-10-15 13:38:48 +02:00
|
|
|
let
|
2023-10-16 11:59:06 +02:00
|
|
|
domain = "kanboard.${config.networking.domain}";
|
|
|
|
domain_short = "kb.${config.networking.domain}";
|
2023-10-15 13:38:48 +02:00
|
|
|
in
|
|
|
|
{
|
2024-10-23 23:58:08 +02:00
|
|
|
sops.secrets."kanboard_env" = { };
|
2024-07-22 18:05:07 +02:00
|
|
|
|
2024-10-23 23:58:08 +02:00
|
|
|
virtualisation.oci-containers = {
|
|
|
|
containers.kanboard = {
|
2024-11-16 10:21:11 +01:00
|
|
|
image = "ghcr.io/kanboard/kanboard:v1.2.42";
|
2024-10-23 23:58:08 +02:00
|
|
|
volumes = [
|
|
|
|
"kanboard_data:/var/www/app/data"
|
|
|
|
"kanboard_plugins:/var/www/app/plugins"
|
|
|
|
];
|
|
|
|
ports = [ "127.0.0.1:8045:80" ];
|
|
|
|
environmentFiles = [
|
|
|
|
config.sops.secrets."kanboard_env".path
|
|
|
|
];
|
2024-05-19 11:16:49 +02:00
|
|
|
};
|
|
|
|
};
|
2023-10-15 13:38:48 +02:00
|
|
|
|
2023-10-16 11:59:06 +02:00
|
|
|
services.nginx = {
|
|
|
|
virtualHosts."${domain_short}" = {
|
|
|
|
locations."/".return = "301 $scheme://${domain}$request_uri";
|
|
|
|
};
|
2023-10-15 13:38:48 +02:00
|
|
|
|
2023-10-16 11:59:06 +02:00
|
|
|
virtualHosts."${domain}" = {
|
2024-10-23 23:58:08 +02:00
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://127.0.0.1:8045";
|
2023-10-15 13:38:48 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|