# mount /dev/disk/by-label/nixos /mnt
```
2. **UEFI systems**
Mount the boot file system on `/mnt/boot`, e.g.
```ShellSession
# mkdir -p /mnt/boot
# mount -o umask=077 /dev/disk/by-label/boot /mnt/boot
```
3. If your machine has a limited amount of memory, you may want to
activate swap devices now (`swapon device`).
The installer (or rather, the build actions that it
may spawn) may need quite a bit of RAM, depending on your
configuration.
```ShellSession
# swapon /dev/sda2
```
4. You now need to create a file `/mnt/etc/nixos/configuration.nix`
that specifies the intended configuration of the system. This is
because NixOS has a *declarative* configuration model: you create or
edit a description of the desired configuration of your system, and
then NixOS takes care of making it happen. The syntax of the NixOS
configuration file is described in [](#sec-configuration-syntax),
while a list of available configuration options appears in
[](#ch-options). A minimal example is shown in
[Example: NixOS Configuration](#ex-config).
This command accepts an optional `--flake` option, to also generate a
`flake.nix` file, if you want to set up a flake-based configuration.
The command `nixos-generate-config` can generate an initial
configuration file for you:
```ShellSession
# nixos-generate-config --root /mnt
```
You should then edit `/mnt/etc/nixos/configuration.nix` to suit your
needs:
```ShellSession
# nano /mnt/etc/nixos/configuration.nix
```
If you're using the graphical ISO image, other editors may be
available (such as `vim`). If you have network access, you can also
install other editors -- for instance, you can install Emacs by
running `nix-env -f '<nixpkgs>' -iA emacs`.
BIOS systems
: You *must* set the option [](#opt-boot.loader.grub.device) to
specify on which disk the GRUB boot loader is to be installed.
Without it, NixOS cannot boot.
If there are other operating systems running on the machine before
installing NixOS, the [](#opt-boot.loader.grub.useOSProber)
option can be set to `true` to automatically add them to the grub
menu.
UEFI systems
: You must select a boot-loader, either systemd-boot or GRUB. The recommended
option is systemd-boot: set the option [](#opt-boot.loader.systemd-boot.enable)
to `true`. `nixos-generate-config` should do this automatically
for new configurations when booted in UEFI mode.
You may want to look at the options starting with
[`boot.loader.efi`](#opt-boot.loader.efi.canTouchEfiVariables) and
[`boot.loader.systemd-boot`](#opt-boot.loader.systemd-boot.enable)
as well.
If you want to use GRUB, set [](#opt-boot.loader.grub.device) to `nodev` and
[](#opt-boot.loader.grub.efiSupport) to `true`.
With systemd-boot, you should not need any special configuration to detect
other installed systems. With GRUB, set [](#opt-boot.loader.grub.useOSProber)
to `true`, but this will only detect windows partitions, not other Linux
distributions. If you dual boot another Linux distribution, use systemd-boot
instead.
If you need to configure networking for your machine the
configuration options are described in [](#sec-networking). In
particular, while wifi is supported on the installation image, it is
not enabled by default in the configuration generated by
`nixos-generate-config`.
Another critical option is `fileSystems`, specifying the file
systems that need to be mounted by NixOS. However, you typically
don't need to set it yourself, because `nixos-generate-config` sets
it automatically in `/mnt/etc/nixos/hardware-configuration.nix` from
your currently mounted file systems. (The configuration file
`hardware-configuration.nix` is included from `configuration.nix`