Compare commits
2 commits
3fd1bb9044
...
2c0e68ef9c
Author | SHA1 | Date | |
---|---|---|---|
|
2c0e68ef9c | ||
|
1ee1b8e07b |
6 changed files with 26 additions and 11 deletions
|
@ -1,10 +1,19 @@
|
|||
# Build a virtual machine based on your generated configurations
|
||||
# Build images based on your generated configurations
|
||||
|
||||
Your Nix configurations are located in the `inventory` folder you can build and run the configuration file you want by running from the NixiN root folder, for example for the demo configuration file:
|
||||
Your Nix configurations are located in the `inventory` folder you can build and run the configuration file you want by running nixos-generate from the NixiN root folder. If the build succeeds, the last output is a command located in your nix store to run your vm.
|
||||
|
||||
## Images formats
|
||||
|
||||
Check <https://github.com/nix-community/nixos-generators?tab=readme-ov-file#supported-formats> to find available formats.
|
||||
|
||||
For example, for qemu-kvm runner
|
||||
|
||||
```bash
|
||||
nix-build '<nixpkgs/nixos>' -A vm -I nixpkgs=channel:nixos-24.05 -I nixos-config=./inventory/demo-configuration.nix
|
||||
./result/bin/run-nixos-vm
|
||||
|
||||
nixos-generate -c inventory/demo-configuration.nix -f vm
|
||||
```
|
||||
|
||||
(nixos-generate is installed by nix-shell, check `shell.nix` to see the packages added)
|
||||
|
||||
## Cross compile
|
||||
|
||||
Check <https://github.com/nix-community/nixos-generators?tab=readme-ov-file#cross-compiling>.
|
||||
|
|
|
@ -87,9 +87,6 @@ export default {
|
|||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking = {
|
||||
hostName = "{{ networkingHostname }}";
|
||||
domain = "{{ networkingDomain }}";
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
virtualisation.vmVariant.virtualisation.forwardPorts = [
|
||||
{ from = "host"; host.port = 8001; guest.port = 8001; }
|
||||
];
|
||||
|
|
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,9 +1,11 @@
|
|||
{
|
||||
"name": "nixin-web",
|
||||
"name": "NixiN",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "NixiN",
|
||||
"license": "AGPL-3.0",
|
||||
"devDependencies": {
|
||||
"vitepress": "^1.3.3"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
{
|
||||
"name": "NixiN",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://git.distrilab.fr/NixiN/nixin-web.git"
|
||||
},
|
||||
"license": "AGPL-3.0",
|
||||
"homepage": "https://nixin.distrilab.eu",
|
||||
"scripts": {
|
||||
"docs:dev": "vitepress dev",
|
||||
"docs:build": "vitepress build",
|
||||
|
|
|
@ -8,5 +8,7 @@ stdenv.mkDerivation {
|
|||
];
|
||||
shellHook = ''
|
||||
export PATH="$PWD/node_modules/.bin/:$PATH"
|
||||
npm install
|
||||
npm run
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue