refactor configuration
This commit is contained in:
parent
d016cc67bc
commit
2aafcc9b49
17 changed files with 154 additions and 149 deletions
|
@ -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}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue