diff options
Diffstat (limited to 'snowfall')
| -rw-r--r-- | snowfall/modules/nixos/services/web/default.nix | 23 | ||||
| -rw-r--r-- | snowfall/systems/x86_64-linux/copenhagen/default.nix | 6 |
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"; |