overview: render service demos#668
Conversation
| ln -s ${fonts} $out/fonts | ||
| '' | ||
| + (concatLines (mapAttrsToList (path: v: writeHtmlCommand path (htmlFile path v)) pages)) | ||
| + (concatLines (mapAttrsToList (path: page: writeProjectCommand path page) pages)) |
There was a problem hiding this comment.
This will also generate the top-level index.html file in a directory called index.html, which isn't what we want, probably
$ ls -lR result/
lrwxrwxrwx - root 1 Jan 1970 fonts -> /nix/store/x5vwknlmicp3wq2z7vqimsz8agyfc1qy-fonts
dr-xr-xr-x - root 1 Jan 1970 index.html
dr-xr-xr-x - root 1 Jan 1970 project
.r--r--r-- 9.2k root 1 Jan 1970 style.css
result/index.html:
.r--r--r-- 15k root 1 Jan 1970 index.htmlThere was a problem hiding this comment.
Good catch! Fixed that.
f19f800 to
8a9b4ff
Compare
|
This should probably be merged before the Nix install workflow is ready, as #698 depends on the |
fricklerhandwerk
left a comment
There was a problem hiding this comment.
Nice, just a bunch of text nits for now. The fewer additional words the better here; the demo works and that should speak for itself.
Let's get this out the door
|
|
||
| machine.wait_for_unit("cryptpad.service") | ||
| machine.wait_for_unit("nginx.service") | ||
| ''; |
There was a problem hiding this comment.
Run curl to make sure it's alive?
There was a problem hiding this comment.
Done, though I have to admit I never ran this before.
| jinja2_template_file = sys.argv[1] | ||
| output_file = sys.argv[2] |
There was a problem hiding this comment.
I can imagine this to be somewhat more natural if it read from stdin and wrote to stdout, but that's maybe cleanup for later.
There was a problem hiding this comment.
True, but currently the script needs the dirname of the output file to read code samples.
| <p> | ||
| Services utilising the NixOS module system generally only run on NixOS. | ||
| If you want to see a quick demo of this project, follow these steps to | ||
| run a preconfigured and tested KVM image on your system. | ||
| </p> | ||
|
|
There was a problem hiding this comment.
| <p> | |
| Services utilising the NixOS module system generally only run on NixOS. | |
| If you want to see a quick demo of this project, follow these steps to | |
| run a preconfigured and tested KVM image on your system. | |
| </p> |
I'd even go as far as saying we don't need to explain anything here. The heading already says what will happen. (We may want to note that you need virtualization enabled though, but more like in a foot note in case it's hyper slow.)
| {{ include_code("nix", "default.nix", relative_path=True) }} | ||
| </li> | ||
| <li> | ||
| <strong>Build the VM start script</strong> defined in <code>default.nix</code> and run it: |
There was a problem hiding this comment.
| <strong>Build the VM start script</strong> defined in <code>default.nix</code> and run it: | |
| <strong>Build the virtual machine</strong> defined in <code>default.nix</code> and run it: |
(It's the best kind of correct that we're actually building the wrapper script, but 🤫)
| Building <strong>will</strong> take a while. | ||
| </li> | ||
| <li> | ||
| <strong>Access the service</strong> from a browser on your host: |
There was a problem hiding this comment.
| <strong>Access the service</strong> from a browser on your host: | |
| <strong>Access the service</strong> with a web browser: |
Not sure if it's important to say you need to access it from your machine... can we safely assume that all operations are done on the same machine?
There was a problem hiding this comment.
My idea was to communicate to people that there is some vm->host forwarding happening, but I guess people wouldn't try to start a webbrowser in the CLI only VM anyways.
| demoGlue.one = exampleText: '' | ||
| # default.nix | ||
| { | ||
| ngipkgs ? import (fetchTarball "https://github.com/ngi-nix/ngipkgs/tarball/${self.rev or "main"}") { }, |
There was a problem hiding this comment.
Hm not sure we want this right now. It will look needlessly noisy and provide no benefit. If we want to protect users from rebuilding everything the next day because we added commits, we should have a release branch instead. But that's for another time.
There was a problem hiding this comment.
The motivation was to have people come back to a demo weeks later and it still works in the exact same way. Probably not so much of a benefit though.
|
@erictapen , are you able to resolve remaining review comments so we can merge this PR ? Thanks. |
Yes, sorry for it taking so long. I should be through all your comments now, @fricklerhandwerk |

This is a first draft of the user-facing side of #614. As we don't have set on a virtualisation solution yet, it contains a lot of place holders.
My goal is to refine this step by step as things fall into place, so it's not exactly ready for review, but I welcome your comments.