mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 06:19:00 +00:00
apps/run-workflow-with-vm: remove wrapper and update README
This commit is contained in:
parent
ba46b81e0a
commit
50b8033ef0
@ -37,3 +37,12 @@ Once you have an folder containing those extra snippets, you can simply include
|
||||
----
|
||||
run-workflow-with-vm a-happy-gnome -I extra-config=./extra-config-stuff
|
||||
----
|
||||
|
||||
Another thing, this script is using https://github.com/nix-community/nixos-generators[nixos-generators] to build the VM which in turn basically uses nixpkgs' integration of it (at `${pkgs.path}/nixos/modules/virtualisation/build-vm.nix`).
|
||||
You can extend it either by adding NixOS modules configuring the virtual machine or by adding certain arguments to the script.
|
||||
This won't be an exhaustive list of niceties as it involves a script that may change but here's some things you can do.
|
||||
|
||||
* You can pass the `SHARED_DIR` environment variable to add a directory to be shared from the host and the guest.
|
||||
This is useful for testing out spontaneous changes as if you're booting into the system itself.
|
||||
|
||||
* You can pass additional arguments as if you're using `qemu-*` utilities which would be useful for changing graphical drivers and all that jazz.
|
||||
|
@ -2,8 +2,6 @@
|
||||
, lib
|
||||
, meson
|
||||
, ninja
|
||||
, nix
|
||||
, makeWrapper
|
||||
, inputs ? [ ]
|
||||
}:
|
||||
|
||||
@ -16,18 +14,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
mesonFlagsArray+=("-Dinputs=[${lib.concatStringsSep "," inputs}]")
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/${finalAttrs.pname} \
|
||||
--prefix PATH ':' '${lib.makeBinPath [ nix ]}'
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Quickly run workflow modules with a VM.";
|
||||
license = licenses.gpl3Plus;
|
||||
|
Loading…
Reference in New Issue
Block a user