- get NixOS Virtualbox appliance from https://nixos.org/nixos/download.html#virtualbox-appliances
- start Virtualbox and "File -> Import Appliance" the downloaded OVA file
- go into Machine -> Settings, then Network / Adapter 1 / Advanced / ensure "Cable Connected" is checked
- start the machine, and wait for it to boot
- login at the graphical login screen, user: demo pw: demo
- when the desktop appears, go to "start" button (it is not labelled in any way) in bottom left, click to get menu
- open a shell with Applications -> System -> Terminal
sudo -i
nixos-generate-config --force
nano /etc/nixos/configuration.nix
and make the changes as shown in the diff (choose your own username)- You need to run
passwd dan
(or whatever username you chose) or you will be unable to login nixos-rebuild switch
Last active
November 22, 2024 11:43
-
-
Save daniel-barlow/969d08dbc11cda5ed1fef27ed8fc840f to your computer and use it in GitHub Desktop.
NixOS demo system on Virtualbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /etc/nixos/configuration.nix-generated 2017-06-21 13:47:10.965150507 +0000 | |
+++ /etc/nixos/configuration.nix 2017-06-21 13:49:55.983742459 +0000 | |
@@ -17,7 +17,7 @@ | |
# boot.loader.grub.efiInstallAsRemovable = true; | |
# boot.loader.efi.efiSysMountPoint = "/boot/efi"; | |
# Define on which hard drive you want to install Grub. | |
- # boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only | |
+ boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only | |
# networking.hostName = "nixos"; # Define your hostname. | |
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. | |
@@ -41,7 +41,7 @@ | |
# List services that you want to enable: | |
# Enable the OpenSSH daemon. | |
- # services.openssh.enable = true; | |
+ services.openssh.enable = true; | |
# Open ports in the firewall. | |
# networking.firewall.allowedTCPPorts = [ ... ]; | |
@@ -53,19 +53,20 @@ | |
# services.printing.enable = true; | |
# Enable the X11 windowing system. | |
- # services.xserver.enable = true; | |
- # services.xserver.layout = "us"; | |
+ services.xserver.enable = true; | |
+ services.xserver.layout = "us"; | |
# services.xserver.xkbOptions = "eurosign:e"; | |
# Enable the KDE Desktop Environment. | |
- # services.xserver.displayManager.sddm.enable = true; | |
- # services.xserver.desktopManager.plasma5.enable = true; | |
+ services.xserver.displayManager.sddm.enable = true; | |
+ services.xserver.desktopManager.plasma5.enable = true; | |
# Define a user account. Don't forget to set a password with ‘passwd’. | |
- # users.extraUsers.guest = { | |
- # isNormalUser = true; | |
- # uid = 1000; | |
- # }; | |
+ users.extraUsers.dan = { | |
+ isNormalUser = true; | |
+ uid = 1000; | |
+ extraGroups = [ "wheel" ]; | |
+ }; | |
# The NixOS release to be compatible with for stateful data such as databases. | |
system.stateVersion = "17.03"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment