25 lines
476 B
Nix
25 lines
476 B
Nix
{ config
|
|
, lib
|
|
, ...
|
|
}:
|
|
let
|
|
cfg = config.dadada.homepage;
|
|
in
|
|
with lib; {
|
|
options.dadada.homepage = {
|
|
enable = mkEnableOption "Enable home page";
|
|
package = mkOption {
|
|
type = lib.types.path;
|
|
description = "Path containing the homepage";
|
|
};
|
|
};
|
|
config = mkIf cfg.enable {
|
|
services.nginx.enable = true;
|
|
|
|
services.nginx.virtualHosts."dadada.li" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
root = "${cfg.package}";
|
|
};
|
|
};
|
|
}
|