Files
nixos-configs/hosts/test-vm/ppp.pm-site.nix
Alexander Heldt f15701f426 Apply nixfmt
2024-09-02 21:55:41 +02:00

42 lines
677 B
Nix

{
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 = {
firewall.allowedTCPPorts = [ 80 ];
};
virtualisation.vmVariant = {
virtualisation = {
forwardPorts = [
{
from = "host";
host.port = 8080;
guest.port = 80;
}
];
};
};
};
}