diff --git a/hosts/srv-core/configuration.nix b/hosts/srv-core/configuration.nix index 962334b..80844ff 100644 --- a/hosts/srv-core/configuration.nix +++ b/hosts/srv-core/configuration.nix @@ -72,6 +72,11 @@ domain = "status.${config.custom.networking.overlay.domain}"; generateDefaultEndpoints = true; }; + + glance = { + enable = true; + domain = "home.${config.custom.networking.overlay.domain}"; + }; }; }; } diff --git a/modules/nixos/web-services/glance.nix b/modules/nixos/web-services/glance.nix new file mode 100644 index 0000000..2767d46 --- /dev/null +++ b/modules/nixos/web-services/glance.nix @@ -0,0 +1,30 @@ +{ config, lib, ... }: +let + cfg = config.custom.web-services.glance; +in +{ + options.custom.web-services.glance = { + enable = lib.mkEnableOption ""; + domain = lib.mkOption { + type = lib.types.nonEmptyStr; + default = ""; + }; + port = lib.mkOption { + type = lib.types.port; + default = 63958; + }; + }; + + config = lib.mkIf cfg.enable { + services.glance = { + enable = true; + settings = { + inherit (cfg) port; + + #pages + }; + }; + + custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port; + }; +}