pinwheel/test-vm: Move development of ppp.pm-site to test-vm
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [];
|
||||
imports = [
|
||||
./ppp.pm-site.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
networking.hostName = "test-vm";
|
||||
|
||||
mod = {};
|
||||
mod = {
|
||||
pppdotpm-site.enable = true;
|
||||
};
|
||||
|
||||
users.users.a = {
|
||||
isNormalUser = true;
|
||||
|
||||
36
hosts/test-vm/ppp.pm-site.nix
Normal file
36
hosts/test-vm/ppp.pm-site.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{ 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;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user