Steps to reproduce:
-
add nix.settings.experimental-features = [ "nix-command" "flakes" ]; to ~/.config/nix/nix.conf
-
execute nixos-rebuild switch
-
execute nix flake init
-
config flake.nix - add git, wget, nixops, etc..
-
execute nix develop
-
add the Prometheus, Prometheus Node Exporter and Grafana settings - /etc/nixos/configuration.nix
-
mkdir /etc/grafana-dashboards
-
chmod 777 /etc/grafana-dashboards
-
mv cpu_memory_disk.json to /etc/grafana-dashboards
-
execute nixos-rebuild switch
-
to build the VM execute nixos-rebuild build-vm --flake .#test
-
to start the VM execute result/bin/run-nixos-vm