refactor configuration

This commit is contained in:
Tim Schubert 2022-09-18 17:26:06 +02:00
parent d016cc67bc
commit 2aafcc9b49
Signed by: dadada
GPG key ID: EEB8D1CE62C4DFEA
17 changed files with 154 additions and 149 deletions

View file

@ -9,6 +9,10 @@ in
with lib; {
options.dadada.homePage = {
enable = mkEnableOption "Enable home page";
package = mkOption {
type = lib.types.package;
description = "Package containing the homepage";
};
};
config = mkIf cfg.enable {
services.nginx.enable = true;
@ -16,7 +20,7 @@ with lib; {
services.nginx.virtualHosts."dadada.li" = {
enableACME = true;
forceSSL = true;
root = "${pkgs.homePage}";
root = "${cfg.package}";
};
};
}