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:
parent
dbbc8c63b8
commit
ab3cc0c217
1 changed files with 6 additions and 1 deletions
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue