From 45e4c32dca6a067cc9c73c1708a10604eba2fe9f Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Tue, 14 Nov 2023 09:05:02 +0100 Subject: [PATCH] pinwheel: Add development module for `ppp.pm-site` --- hosts/pinwheel/configuration.nix | 1 + .../pinwheel/modules/ppp.pm-site/default.nix | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 hosts/pinwheel/modules/ppp.pm-site/default.nix diff --git a/hosts/pinwheel/configuration.nix b/hosts/pinwheel/configuration.nix index 29a774f..13f1d15 100644 --- a/hosts/pinwheel/configuration.nix +++ b/hosts/pinwheel/configuration.nix @@ -97,6 +97,7 @@ podman.enable = false; vm.enable = true; scripts.enable = true; + pppdotpm-site.enable = false; }; # This value determines the NixOS release from which the default diff --git a/hosts/pinwheel/modules/ppp.pm-site/default.nix b/hosts/pinwheel/modules/ppp.pm-site/default.nix new file mode 100644 index 0000000..d0a72f4 --- /dev/null +++ b/hosts/pinwheel/modules/ppp.pm-site/default.nix @@ -0,0 +1,22 @@ +{ inputs, lib, config, ... }: +let + enabled = config.mod.pppdotpm-site.enable; +in +{ + imports = [ inputs.pppdotpm-site.nixosModules.default ]; + + options = { + mod.pppdotpm-site = { + enable = lib.mkEnableOption "enable ppp.pm site"; + }; + }; + + config = lib.mkIf enabled { + services.pppdotpm-site = { + enable = true; + domain = "ppp.pm.local"; + }; + + networking.extraHosts = "127.0.0.1 ppp.pm.local"; + }; +}