flake.nix,docs: add a vm app output for running the vm more conveniently, update hacking doc #288

merged
opened by ptr.pet targeting master from ptr.pet/core: dev
Changed files
+11 -4
docs
+5 -4
docs/hacking.md
···
`nixos-shell` like so:
```bash
-
QEMU_NET_OPTS="hostfwd=tcp::6000-:6000,hostfwd=tcp::2222-:22" nixos-shell --flake .#knotVM
+
nix run .#vm
+
# or nixos-shell --flake .#vm
# hit Ctrl-a + c + q to exit the VM
```
-
This starts a knot on port 6000 with `ssh` exposed on port
-
2222. You can push repositories to this VM with this ssh
-
config block on your main machine:
+
This starts a knot on port 6000, a spindle on port 6555
+
with `ssh` exposed on port 2222. You can push repositories
+
to this VM with this ssh config block on your main machine:
```bash
Host nixos-shell
+6
flake.nix
···
type = "app";
program = ''${tailwind-watcher}/bin/run'';
};
+
vm = {
+
type = "app";
+
program = toString (pkgs.writeShellScript "vm" ''
+
${pkgs.nixos-shell}/bin/nixos-shell --flake .#vm
+
'');
+
};
});
nixosModules.appview = import ./nix/modules/appview.nix {inherit self;};