The following piece of Code can be used to run serve the current directory on port 8080:
let
httpnix = import (builtins.fetchGit https://codeberg.org/pauljako/httpnix);
in
httpnix.run {handler = httpnix.modules.serveFiles {directory = ./.;};}
Save the File as default.nix and run nix eval --file ./default.nix --impure --allow-unsafe-native-code-during-evaluation