From 304f412950124d2344eae9e9733ad4b35745b2cc Mon Sep 17 00:00:00 2001 From: Florian Schmitt Date: Sat, 28 Sep 2024 20:11:22 +0300 Subject: [PATCH] feat: build instructions and example --- .gitignore | 2 ++ .vitepress/config.mts | 2 +- build-virtual-machine.md | 10 ++++++++++ installation.md | 23 +++++++++++++++++++++++ inventory/demo-configuration.nix | 18 ++++++++++++++++++ 5 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 build-virtual-machine.md create mode 100644 installation.md create mode 100644 inventory/demo-configuration.nix diff --git a/.gitignore b/.gitignore index 46cf94e..1dedfbd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ .DS_Store +*.qcow2 +result node_modules cache dist diff --git a/.vitepress/config.mts b/.vitepress/config.mts index 4636940..539c360 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -36,7 +36,7 @@ export default defineConfig({ { text: 'Getting started', items: [ - { text: 'Generate configuration', link: '/generate' }, + { text: 'Local installation', link: '/installation' }, { text: 'Build virtual machine', link: '/build-virtual-machine' }, ] } diff --git a/build-virtual-machine.md b/build-virtual-machine.md new file mode 100644 index 0000000..356d5aa --- /dev/null +++ b/build-virtual-machine.md @@ -0,0 +1,10 @@ +# Build a virtual machine 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: + +```bash +nix-build '' -A vm -I nixpkgs=channel:nixos-24.05 -I nixos-config=./inventory/demo-configuration.nix +./result/bin/run-nixos-vm + +``` + diff --git a/installation.md b/installation.md new file mode 100644 index 0000000..ea72bdb --- /dev/null +++ b/installation.md @@ -0,0 +1,23 @@ +# Installation + +## Requirements + +For now, the NixiN installation process was just tested on a Linux distribution, on a computer with virtualisation capacities. +So only requirements are : + +- A Linux system with virtualisation support +- With Nix installed + +## Grab the code and run locally + +Get the latest version from the official repository + +```bash +git clone https://git.distrilab.fr/NixiN/nixin-web +``` + +Go in the main folder and run the `shell.nix` to install dependencies + +```bash +cd nixin-web && nix-shell +``` diff --git a/inventory/demo-configuration.nix b/inventory/demo-configuration.nix new file mode 100644 index 0000000..c2166f0 --- /dev/null +++ b/inventory/demo-configuration.nix @@ -0,0 +1,18 @@ +{ config, pkgs, ... }: +{ + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + services.xserver.enable = true; + + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; + + users.users.alice = { + isNormalUser = true; + extraGroups = [ "wheel" ]; + initialPassword = "test"; + }; + + system.stateVersion = "24.05"; +}