From 6ddb56f7227cd4d234902b424a48771796296613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Barnouin?= Date: Sun, 13 Oct 2024 18:12:54 +0200 Subject: [PATCH] Migrate Nginx from microvm to proxmox LXC container --- flake.nix | 9 +-------- services/minimalConfig/default.nix | 10 ++++++++-- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/flake.nix b/flake.nix index 1d00d1c..62f9139 100644 --- a/flake.nix +++ b/flake.nix @@ -113,19 +113,12 @@ nginx = nixpkgs.lib.nixosSystem { inherit system; modules = [ - microvm.nixosModules.microvm - "${inputs.self}/systems" "${inputs.self}/services" { + networking.hostName = "nixos-nginx"; services.vm_nginx = { enable = true; }; - services.vm = { - enable = true; - hostname = "nginx"; - vm_ip = proxy_host; - macAddr = "02:00:00:00:00:40"; - }; } ]; }; diff --git a/services/minimalConfig/default.nix b/services/minimalConfig/default.nix index cb2fa79..6757520 100644 --- a/services/minimalConfig/default.nix +++ b/services/minimalConfig/default.nix @@ -1,12 +1,18 @@ -{ config, pkgs, lib, inputs, ... }: +{ config, pkgs, lib, inputs, modulesPath, ... }: { nix = { settings.experimental-features = [ "nix-command" "flakes" ]; 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 = { - hostName = "${config.services.vm.hostname}"; firewall = { enable = true; allowedTCPPorts = [ 22 9002 ];