aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index 2800ac7..c88a917 100644
--- a/flake.nix
+++ b/flake.nix
@@ -65,6 +65,12 @@
description = "Domain to serve.";
};
+ default = lib.mkOption {
+ type = types.bool;
+ default = false;
+ description = "Make this vhost the default for nginx.";
+ };
+
package = mkOption {
type = types.package;
description = "Package whose /share/web contains the built site.";
@@ -100,6 +106,7 @@
in
{
root = "${cfg.package}/share/web";
+ default = cfg.default;
locations."/" = {
tryFiles = "$uri $uri/ /index.html";