diff options
Diffstat (limited to 'apps/static-website')
-rw-r--r-- | apps/static-website/appspec.nix | 14 | ||||
-rw-r--r-- | apps/static-website/module.nix | 4 |
2 files changed, 18 insertions, 0 deletions
diff --git a/apps/static-website/appspec.nix b/apps/static-website/appspec.nix new file mode 100644 index 0000000..c7e919e --- /dev/null +++ b/apps/static-website/appspec.nix @@ -0,0 +1,14 @@ +{ fysilib, lib, ... }: { + description = "static website"; + endOfLife = null; + options = { + domain = lib.mkOption { + description = "Domain of the website"; + type = fysilib.types.fqdn; + }; + root = lib.mkOption { + description = "Domain of the website"; + type = fysilib.types.str; + }; + }; +} diff --git a/apps/static-website/module.nix b/apps/static-website/module.nix new file mode 100644 index 0000000..659dfad --- /dev/null +++ b/apps/static-website/module.nix @@ -0,0 +1,4 @@ +{ appConfig, ... }: { + services.nginx.enable = true; + services.nginx.virtualHosts.${appConfig.domain}.locations."/".root = appConfig.root; +} |