Commit graph

86 commits

Author SHA1 Message Date
Else Someone
c275340694 default.nix: init
...adds callPackage-able scope.nix and a flake-compat-based entrypoint at default.nix
2026-03-21 02:42:23 +02:00
Val Packett
a7fe813f17 Add wl-backdrop (WIP) --bg-color option 2026-03-06 06:45:39 -03:00
Val Packett
38a96b79b3 [BREAKING] Provide runtime environment systemd services from munix
These services evolve as munix evolves, so they should not be part of
the system closures themselves. Mount them into /run/systemd instead.

(Yes, making /run/systemd/system a symlink to RO files is unfortunate,
 that could be changed in the future. FS prep code is annoying too..)
2026-03-06 06:09:48 -03:00
Val Packett
604ebc1356 [BREAKING] Switch to virtgpu-based D-Bus tunneling
This introduces support for drag&drop and printing portals, and later
camera/screencasting should be possible as well. However we break
backwards compatibility with already built closures because the
nixosModule needs to be changed.

In the next commit, the runtime environment related services will be
removed from the nixosModule to prevent unnecessary future breakage.
2026-03-06 05:09:55 -03:00
Val Packett
e00609ce73 nix: add some camera/pw testing tools to testvm 2026-02-27 02:50:54 -03:00
Val Packett
beeb5f5d9f Fork libkrun again to fix buffer mapping permission issue (fix #18)
Initial D-Bus WIP is also there..
2026-02-27 02:48:17 -03:00
zimbatm
adf2d24b60 fix(template): use structured settings for MPD audio output
Replace deprecated extraConfig with settings.audio_output
2026-02-24 11:08:53 +01:00
Val Packett
981393443b Set up a monotonic clock boot time offset in the VM 2026-02-20 05:17:13 -03:00
Val Packett
8c3878f117 Pass timezone through to the VM
What a way to discover that this was missing- PipeWire camera was
freezing unless something on the host was already streaming it…

gstclock.c:1086:gst_clock_get_internal_time:<pipewireclock0> internal time 1:01:04.622699903
gstclock.c:1129:gst_clock_get_time:<pipewireclock0> adjusted time 5123776:20:12.866176008

Well, that wasn't even caused by the TZ but it made me think to fix it..

NOTE for local dev, rebuild micro-activate now
2026-02-20 04:19:18 -03:00
Val Packett
322b6efc1c nix: testvm: update stateVersion, add rewaita (theme coloring for demos) 2026-02-13 14:55:42 -03:00
Val Packett
820fcd3da1 nix: chase removal of etc overlay symlinks, fixes #14 2026-02-13 14:55:09 -03:00
Val Packett
53f827553f nix: add nautilus to testvm
Will be useful for testing drag-out
2026-02-07 01:24:55 -03:00
Val Packett
09f1eb76de nix: comment out libkrun(fw) source overrides
As we're currently using entirely upstream ones right now. Let's reuse
the cache.nixos.org builds.
2026-02-07 01:24:44 -03:00
Val Packett
9708e5fb64 nix: update nixpkgs
now includes the most recent libkrun(fw) releases
2026-02-07 00:21:19 -03:00
Val Packett
67666b8f46 nix: update sidebus and flake-parts
sidebus now uses flake-parts too
2026-02-07 00:17:26 -03:00
Val Packett
585970fe92 munix: do not set display from the script
It is now entirely managed by systemd.
2026-01-30 06:12:35 -03:00
Val Packett
a82b0de310 munix: set wayland/pw/portal enablement variables for toolkits by default 2026-01-30 06:10:48 -03:00
Val Packett
8113c269cb munix: add more arg shorthands 2026-01-30 05:47:22 -03:00
Val Packett
38213f4ada munix: add publish argument for port forwarding, fix #11
TODO: fix https://github.com/AsahiLinux/muvm/issues/178 as well
2026-01-30 05:44:13 -03:00
Val Packett
425ff896c8 nix: deorbit virtwl-proxy 2026-01-30 04:35:20 -03:00
Val Packett
9911b15fb7 nix: switch to wl-cross-domain-proxy 2026-01-30 04:27:22 -03:00
Val Packett
13b2afcc14 nix: add package for wl-cross-domain-proxy 2026-01-30 03:16:39 -03:00
Val Packett
c89c9e4d9b nix: testvm: more test apps 2026-01-30 03:15:49 -03:00
Val Packett
40d82a0fd8 nix: use static userborn
as it's upstream now
2026-01-30 01:39:17 -03:00
Val Packett
c11c6c6292 nix: update inputs 2026-01-30 00:02:31 -03:00
Val Packett
447ccad362 nix: devShell: add packages for proxy development 2026-01-29 20:54:07 -03:00
Jörg Thalheim
2d7860294d switch from flake-utils to flake-parts
there is not so much of a difference in this project, but
it means adding this project to clan, one less flake input
and also more consistency with other projects in clan.
2026-01-16 15:13:00 +01:00
Jörg Thalheim
06a26e7dee munix: add -- before command args to prevent option parsing
muvm was interpreting command arguments like '-c' (from /bin/sh -c)
as its own options. Adding '--' separates muvm options from the
command and its arguments.
2026-01-15 17:10:05 +01:00
Val Packett
214d4c4500 nixos: set shell for appvm user
Surprisingly, gdb of all things uses the login shell from /etc/passwd to
launch the program under test, so I was seeing the
"This account is currently not available" message there.
2026-01-09 06:46:59 -03:00
Val Packett
612453a3bc Update sidebus 2025-12-18 04:29:48 -03:00
Val Packett
787ca12b1e Start sidebus-agent strictly before the apps
Gtk uses G_DBUS_CALL_FLAGS_NO_AUTO_START in all the (early) portal calls
so we basically get a version of https://gitlab.gnome.org/GNOME/gtk/-/issues/7379
if we try to lazily start the agent..
2025-12-18 04:24:17 -03:00
Val Packett
f336a0d5ff micro-activate: generate machine-id randomly
D-Bus is supposed to (?) use it to decide whether it can use FD passing,
shared memory, etc. and while we do a lot of cross-domain magic it's not
quite seamless :) so let's not reuse the host one.
2025-12-18 04:21:52 -03:00
Jörg Thalheim
1d864e0ded template: simplify with forAllSystems and inline module
Use the forAllSystems pattern to reduce duplication and inline the
NixOS module directly in nixosSystem call. This eliminates the need for
separate nixosModules and nixosConfigurations outputs, making the
template more concise and easier to understand.

Also use virtualisation.munix namespace for the option.
2025-12-15 16:48:58 +01:00
Jörg Thalheim
ced0559be8 nixos: add munix.defaultCommand option and system.build.munix
Add a NixOS option to configure the default command for the VM and
provide a system.build.munix output that wraps munix with the correct
toplevel and default command. This reduces boilerplate in downstream
flakes since they no longer need to manually wrap munix.

The template now uses these new features, significantly simplifying
the apps definition.
2025-12-15 16:24:56 +01:00
Jörg Thalheim
2d721419e6 readme: move example to flake template
Replace inline flake.nix example with a proper flake template that users
can instantiate with `nix flake init`. This makes it easier to get
started and we can easier test the example.
2025-12-15 16:12:56 +01:00
Val Packett
fb53769c7a readme: add basic initial example of defining a vm (fix #8)
Starting point to simplify
2025-12-09 06:45:30 -03:00
Val Packett
ab5f412524 Add dconf to testvm
Pretty much required by GTK apps
2025-12-09 06:41:09 -03:00
Val Packett
20e7e88e07 Update sidebus (now reverse-client to a session bus in the guest) 2025-12-09 06:41:01 -03:00
Val Packett
bfb8352c55 nix: update sidebus (unhardcode user/group IDs) 2025-12-05 05:00:27 -03:00
Val Packett
cc135479ef systemd: chown XDG_RUNTIME_DIR again
This was temporarily gone due to refactorings (throwing out tmpfiles).
2025-12-05 04:09:40 -03:00
Val Packett
bfc037e615 systemd: hoist XDG_RUNTIME_DIR up to manager defaults
In some cases it might be needed in arbitrary services.. such as mpd
needing PipeWire to play sound into
2025-12-05 04:08:46 -03:00
Val Packett
73d2501781 systemd: use sockets.target
This allows using normal nix-managed services that register sockets for
lazy activation. Also brings in some red errors about starting services
that we don't have, but that will be fixed
2025-12-05 04:07:04 -03:00
Val Packett
fd771dd95f munix: make the default command overridable via env
This is convenient for app launch wrappers that would want to set their
own default command but still allow overriding it
2025-12-05 04:06:05 -03:00
Val Packett
2a98ae83af nix: update libkrun (aarch64 fixes) 2025-12-05 00:31:09 -03:00
Val Packett
d2070a1bec nix: set system.switch.enable = false
Will be required by the upstreamed static userborn, and shouldn've been
part of the initial research anyway :)
2025-12-05 00:09:03 -03:00
Val Packett
5f1783b9bb nix: update flake comment to mention --override-input 2025-12-05 00:08:30 -03:00
Jörg Thalheim
c7ec9872ca fix: disable systemd-resolved (not needed, DNS comes from host via passt) 2025-12-04 23:59:42 -03:00
Jörg Thalheim
57b8ae3424 switch from git submodules to flake inputs 2025-12-04 23:59:33 -03:00
Val Packett
6e8e4b9fda nix: replace pkgs.system with pkgs.stdenv.hostPlatform.system
evaluation warning: ‘system’ has been renamed to/replaced by ‘stdenv.hostPlatform.system’
2025-12-04 23:52:14 -03:00
Val Packett
7aa9f614da systemd: get udevd out of the critical chain
We don't need to wait for it at all
2025-12-04 23:48:17 -03:00