From f38abd1320900c7b22d2ee6cf9f989194d03a3af Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Fri, 25 Oct 2024 14:46:44 +0200 Subject: [PATCH] nixos-vm: try nginx and docker --- hosts/nixos-test/configuration.nix | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/hosts/nixos-test/configuration.nix b/hosts/nixos-test/configuration.nix index 44d28b0..0cf4698 100644 --- a/hosts/nixos-test/configuration.nix +++ b/hosts/nixos-test/configuration.nix @@ -36,23 +36,31 @@ }; modules.system = { - desktop = { - plasma.enable = true; - }; - server = { docker.enable = true; openssh.enable = true; }; hardware = { - bluetooth.enable = true; - gamingKernel.enable = true; keymaps.layout = "us"; - pipewire.enable = true; - plymouth.enable = true; - printing.enable = true; - waydroid.enable = true; + }; + }; + + # Run containers + virtualisation.oci-containers.containers."hello" = { + image = "docker.io/nginxdemos/hello:latest"; + + ports = [ + "9000:80/tcp" + ]; + }; + + services.nginx = { + enable = true; + virtualHosts."hello.local" = { + locations."/" = { + proxyPass = "http://127.0.0.1:9000"; + }; }; }; }