nix-config/nixos/modules/homepage.nix
2022-08-04 21:13:54 +02:00

22 lines
372 B
Nix

{ config
, pkgs
, lib
, ...
}:
let
cfg = config.dadada.homePage;
in
with lib; {
options.dadada.homePage = {
enable = mkEnableOption "Enable home page";
};
config = mkIf cfg.enable {
services.nginx.enable = true;
services.nginx.virtualHosts."dadada.li" = {
enableACME = true;
forceSSL = true;
root = "${pkgs.homePage}";
};
};
}