Some checks are pending
Continuous Integration / Checks (push) Waiting to run
27 lines
488 B
Nix
27 lines
488 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" = {
|
|
useACMEHost = "dadada.li";
|
|
forceSSL = true;
|
|
root = "${cfg.package}";
|
|
};
|
|
};
|
|
}
|