Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init project demos #613

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Init project demos #613

wants to merge 5 commits into from

Conversation

eljamm
Copy link
Contributor

@eljamm eljamm commented Mar 18, 2025

To test this, you can run nix run .#project-demos.<project-name/example>. For example:

$ nix run .#project-demos.Openfire-IPv6/base

Note that the VM system doesn't imports classic'.extendedNixosModules for the example, which is better since examples should be self-contained. Let's just keep importing all the modules for now.

@eljamm eljamm requested review from imincik and erictapen March 18, 2025 09:48
This is redundant since examples should already have been tested.
@erictapen
Copy link
Contributor

Nice! The examples don't work yet though, as they lack their module?

$ nix run .#project-demos.Keyoxide/keyoxide-web
error:
       … while evaluating the attribute 'config.system.build.vm'
         at /nix/store/crrwsv142k1vkwdba7q26y73760n4bll-source/lib/modules.nix:336:9:
          335|         options = checked options;
          336|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          337|         _module = checked (config._module);

       … while calling the 'seq' builtin
         at /nix/store/crrwsv142k1vkwdba7q26y73760n4bll-source/lib/modules.nix:336:18:
          335|         options = checked options;
          336|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          337|         _module = checked (config._module);

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: The option `services.keyoxide' does not exist. Definition values:
       - In `/nix/store/y54pzyxbd1bdf8i4pzg1yvq0q7q0jl24-source/projects/Keyoxide/keyoxide-web/example.nix':
           {
             enable = true;
           }

Let's not do this right now and keep it simple
@eljamm
Copy link
Contributor Author

eljamm commented Mar 18, 2025

Yeah, let's just keep importing all the modules for now. The example in the description is probably not the best either. I'll change that in a second.

@eljamm
Copy link
Contributor Author

eljamm commented Mar 18, 2025

One thing I'm thinking about is that we could probably make 2 types of VMs depending on what the example needs:

  • Graphical with GPU acceleration (OpenGL or Vulkan)
  • Minimal CLI only

Or we could run everything in a graphical VM and have the experience be close to what it feels like using NixOS as a users.

@erictapen
Copy link
Contributor

Yeah I was thinking about how much customisation each demo VM might need. My tendency would be to keep stuff as minimalistic as possible, e.g. a service that mostly provides a web interface should not boot a display manager.

@fricklerhandwerk
Copy link
Contributor

Yes, another heuristic is to look at the intended use case, one of which is self hosting web services -- we don't need a GUI there.

@eljamm eljamm marked this pull request as draft March 21, 2025 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs refinement
Development

Successfully merging this pull request may close these issues.

3 participants