aboutsummaryrefslogtreecommitdiff
path: root/snowfall
diff options
context:
space:
mode:
authorCaroline Larimore <caroline@larimo.re>2025-04-14 14:51:36 -0700
committerCaroline Larimore <caroline@larimo.re>2025-04-14 18:58:53 -0700
commit5a8d24052232b776858aae9d63da58169db62465 (patch)
treef2809ee82f0698f6fef35a396faef1f41f560615 /snowfall
parent596308634840634c216e8f1f1db8920886df0aa4 (diff)
migration: webserver core
Diffstat (limited to 'snowfall')
-rw-r--r--snowfall/modules/nixos/services/web/default.nix23
-rw-r--r--snowfall/systems/x86_64-linux/copenhagen/default.nix6
2 files changed, 29 insertions, 0 deletions
diff --git a/snowfall/modules/nixos/services/web/default.nix b/snowfall/modules/nixos/services/web/default.nix
new file mode 100644
index 0000000..1e1e854
--- /dev/null
+++ b/snowfall/modules/nixos/services/web/default.nix
@@ -0,0 +1,23 @@
+{ options, config, lib, namespace, ... }:
+
+with lib; with lib.${namespace}; let
+ cfg = config.${namespace}.services.web;
+ impermanence = config.${namespace}.system.impermanence;
+in {
+ options.${namespace}.services.web = with types; {
+ enable = mkEnableOption "web";
+ };
+
+ config = mkIf cfg.enable {
+ environment.persistence.${impermanence.location} = {
+ directories = [
+ "/var/lib/acme"
+ ];
+ };
+
+ security.acme = {
+ acceptTerms = true;
+ defaults.email = "caroline@larimo.re";
+ };
+ };
+}
diff --git a/snowfall/systems/x86_64-linux/copenhagen/default.nix b/snowfall/systems/x86_64-linux/copenhagen/default.nix
index 38705a8..ff0c0ed 100644
--- a/snowfall/systems/x86_64-linux/copenhagen/default.nix
+++ b/snowfall/systems/x86_64-linux/copenhagen/default.nix
@@ -14,6 +14,12 @@ with lib; with lib.${namespace}; {
impermanence.enable = true;
impermanence.home.enable = true;
};
+
+ services = {
+ web = {
+ enable = true;
+ }
+ }
};
system.stateVersion = "23.11";