refactor
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user