vm: Serve www directory from a shared directory

Run the VM as

    WWW="$PWD/www" nix run

to serve the www directory from within the VM.
This commit is contained in:
Alexander Kobjolke 2024-01-14 21:52:48 +01:00
parent dbbc8c63b8
commit ab3cc0c217

View file

@ -6,7 +6,7 @@
virtualHosts.localhost.locations."/" = {
index = "index.html";
root = ./www;
root = "/var/www";
};
};
};
@ -19,5 +19,10 @@
host.port = 8080;
}];
virtualisation.sharedDirectories.www = {
source = "$WWW";
target = "/var/www";
};
system.stateVersion = "23.11";
}