summaryrefslogtreecommitdiff
path: root/nix/module.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/module.nix')
-rw-r--r--nix/module.nix35
1 files changed, 0 insertions, 35 deletions
diff --git a/nix/module.nix b/nix/module.nix
deleted file mode 100644
index decb686..0000000
--- a/nix/module.nix
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- config,
- lib,
- pkgs,
- ...
-}: let
- cfg = config.services.getchoo-website;
- inherit (lib) mkEnableOption mkIf mkOption types;
-in {
- options.services.getchoo-website = {
- enable = mkEnableOption "enable getchoo-website";
-
- hostName = mkOption {
- type = types.str;
- description = "hostname for nginx virtualHost";
- };
-
- location = mkOption {
- type = types.str;
- default = "/";
- description = "location to serve on virtualHost";
- };
- };
-
- config.services.nginx = mkIf cfg.enable {
- enable = true;
- virtualHosts.${cfg.hostName} = {
- locations.${cfg.location} = {
- root = "${pkgs.getchoo-website}/libexec/getchoo-website/deps/getchoo-website/dist/";
- index = "index.html";
- tryFiles = "$uri =404";
- };
- };
- };
-}