summaryrefslogtreecommitdiff
path: root/hosts/ahmed/linus.onl
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/ahmed/linus.onl')
-rw-r--r--hosts/ahmed/linus.onl/default.nix19
1 files changed, 6 insertions, 13 deletions
diff --git a/hosts/ahmed/linus.onl/default.nix b/hosts/ahmed/linus.onl/default.nix
index 52703fe..c31eb73 100644
--- a/hosts/ahmed/linus.onl/default.nix
+++ b/hosts/ahmed/linus.onl/default.nix
@@ -1,22 +1,15 @@
{
pkgs,
lib,
- config,
...
}: let
- inherit (lib) mkEnableOption mkOption types mkIf optional;
-
+ # The domain to serve. Also kinda embedded in the name of the module??
domain = "linus.onl";
- cfg = config.modules."${domain}";
+ # Enable HTTPS stuff.
+ useACME = true;
in {
- options.modules."${domain}" = {
- enable = mkEnableOption "${domain} static site";
-
- useACME = mkEnableOption "built-in HTTPS stuff";
- };
-
- config = mkIf cfg.enable {
+ config = {
# Create a user to run the build script under.
users.users."${domain}-builder" = {
description = "builds ${domain}";
@@ -91,8 +84,8 @@ in {
services.nginx = {
virtualHosts."${domain}" = {
# NOTE: 'forceSSL' will cause an infite loop, if the cloudflare proxy does NOT connect over HTTPS.
- enableACME = cfg.useACME;
- forceSSL = cfg.useACME;
+ enableACME = useACME;
+ forceSSL = useACME;
root = "/var/www/${domain}";
};
};