Compare commits
No commits in common. "f043d47382690dfdd024d6609e1ca19769db430a" and "cd1c1eea16a0aef0a4343abd2ef845e17c5ca9a6" have entirely different histories.
f043d47382
...
cd1c1eea16
4 changed files with 2 additions and 37 deletions
25
README.md
25
README.md
|
@ -10,31 +10,6 @@ nixos-rebuild switch --flake flake_path_directory#hostname
|
|||
nix flake update --extra-experimental-features "nix-command flakes"
|
||||
```
|
||||
|
||||
## Configure VM
|
||||
|
||||
Configure VM
|
||||
```nix
|
||||
users.users.<user>.initialPassword = "<password>";
|
||||
virtualisation.vmVariant = {
|
||||
# following configuration is added only when building VM with build-vm
|
||||
virtualisation = {
|
||||
memorySize = <RAM in MiB>; # Use 8192MiB memory.
|
||||
cores = <CPU Core number>;
|
||||
# And more here https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/virtualisation/qemu-vm.nix
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
Build
|
||||
```bash
|
||||
nixos-rebuild build-vm --flake .#nixos-test
|
||||
```
|
||||
|
||||
Run
|
||||
```bash
|
||||
./result/bin/run-nixos-vm-vm
|
||||
```
|
||||
|
||||
## Show changements between revisions
|
||||
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
username = "florian";
|
||||
homeDirectory = "/home/florian";
|
||||
|
||||
stateVersion = "24.05";
|
||||
stateVersion = "23.11";
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
|
|
@ -30,15 +30,5 @@
|
|||
};
|
||||
};
|
||||
|
||||
# Configure for testing in vm
|
||||
users.users.florian.initialPassword = "test";
|
||||
virtualisation.vmVariant = {
|
||||
# following configuration is added only when building VM with build-vm
|
||||
virtualisation = {
|
||||
memorySize = 8192; # Use 8192MiB memory.
|
||||
cores = 8;
|
||||
};
|
||||
};
|
||||
|
||||
networking.hostName = "nixos-vm"; # Define your hostname.
|
||||
}
|
||||
|
|
|
@ -56,5 +56,5 @@
|
|||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue