Migrate Nginx from microvm to proxmox LXC container
This commit is contained in:
parent
7d969f0c99
commit
6ddb56f722
2 changed files with 9 additions and 10 deletions
|
@ -113,19 +113,12 @@
|
||||||
nginx = nixpkgs.lib.nixosSystem {
|
nginx = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = [
|
modules = [
|
||||||
microvm.nixosModules.microvm
|
|
||||||
"${inputs.self}/systems"
|
|
||||||
"${inputs.self}/services"
|
"${inputs.self}/services"
|
||||||
{
|
{
|
||||||
|
networking.hostName = "nixos-nginx";
|
||||||
services.vm_nginx = {
|
services.vm_nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
services.vm = {
|
|
||||||
enable = true;
|
|
||||||
hostname = "nginx";
|
|
||||||
vm_ip = proxy_host;
|
|
||||||
macAddr = "02:00:00:00:00:40";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,12 +1,18 @@
|
||||||
{ config, pkgs, lib, inputs, ... }:
|
{ config, pkgs, lib, inputs, modulesPath, ... }:
|
||||||
{
|
{
|
||||||
nix = {
|
nix = {
|
||||||
settings.experimental-features = [ "nix-command" "flakes" ];
|
settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
settings.trusted-users = [ "root" "@wheel" ];
|
settings.trusted-users = [ "root" "@wheel" ];
|
||||||
};
|
};
|
||||||
|
imports = [ (modulesPath + "/virtualisation/proxmox-lxc.nix") ];
|
||||||
|
|
||||||
|
systemd.suppressedSystemUnits = [
|
||||||
|
"dev-mqueue.mount"
|
||||||
|
"sys-kernel-debug.mount"
|
||||||
|
"sys-fs-fuse-connections.mount"
|
||||||
|
];
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "${config.services.vm.hostname}";
|
|
||||||
firewall = {
|
firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowedTCPPorts = [ 22 9002 ];
|
allowedTCPPorts = [ 22 9002 ];
|
||||||
|
|
Loading…
Reference in a new issue