This commit is contained in:
Joakim Repomaa
2025-02-12 20:58:42 +02:00
parent dd4e5c63e3
commit c519f8d83e
17 changed files with 182 additions and 252 deletions

View File

@@ -1,12 +1,12 @@
{ pkgs, inputs, config, lib, ... }:
let
cfg = config.modules.services.workout-sync;
cfg = config.services.workout-sync;
fqdn = "${cfg.subdomain}.${config.networking.domain}";
port = cfg.port;
workout-sync = inputs.workout-sync.packages.${pkgs.system}.default;
in
{
options.modules.services.workout-sync = {
options.services.workout-sync = {
enable = lib.mkEnableOption "Enable Workout Sync";
subdomain = lib.mkOption {
type = lib.types.str;
@@ -18,7 +18,7 @@ in
};
config = lib.mkIf cfg.enable {
modules.services.workout-tracker.enable = lib.mkDefault true;
services.workout-tracker.enable = lib.mkDefault true;
systemd.services.workout-sync = {
enable = true;
@@ -46,7 +46,7 @@ in
confinement.enable = true;
};
modules.services.webserver = {
services.webserver = {
enable = lib.mkDefault true;
vHosts.${fqdn}.locations."/" = {
proxyPort = port;