Added wakapi, open source wakatime

This commit is contained in:
2025-01-01 13:46:50 +02:00
parent ca4a1df5fc
commit f35bccf1ac
2 changed files with 38 additions and 0 deletions

View File

@@ -10,6 +10,7 @@
./../nixosModules/gitea.nix
./../nixosModules/syncthing.nix
./../nixosModules/nextcloud.nix
./../nixosModules/wakapi.nix
];
boot.loader.grub = {
@@ -41,6 +42,7 @@
gitea.enable = true;
syncthing.enable = true;
nextcloud.enable = false;
wakapi.enable = true;
# Automatically pull this config from git
autoUpdate.enable = true;

36
nixosModules/wakapi.nix Normal file
View File

@@ -0,0 +1,36 @@
{ pkgs, lib, config, ... }: {
imports = [
./acme.nix
];
options = {
wakapi.enable = lib.mkEnableOption "enables wakapi";
};
config = lib.mkIf config.wakapi.enable {
# Open http and https ports to the public
networking.firewall.allowedTCPPorts = [ 443 80 ];
# Make sure acme module is active for the "kyren.codes" ssl cert
acme.enable = true;
services.nginx.enable = true;
services.nginx.virtualHosts."waka.kyren.codes" = {
useACMEHost = "kyren.codes";
forceSSL = true;
locations."/".proxyPass = "http://localhost:3003/";
};
services.wakapi.enable = true;
services.wakapi = {
database.createLocally = true;
passwordSalt = "dad8uadu8ad8a";
settings = {
port = 3003;
public_url = "http://waka.kyren.codes:3003";
};
};
};
}