diff options
Diffstat (limited to 'nixpkgs/nixos/doc/manual/installation')
6 files changed, 47 insertions, 29 deletions
diff --git a/nixpkgs/nixos/doc/manual/installation/building-images-via-systemd-repart.chapter.md b/nixpkgs/nixos/doc/manual/installation/building-images-via-systemd-repart.chapter.md index 10bee156d113..5a552a54f531 100644 --- a/nixpkgs/nixos/doc/manual/installation/building-images-via-systemd-repart.chapter.md +++ b/nixpkgs/nixos/doc/manual/installation/building-images-via-systemd-repart.chapter.md @@ -18,11 +18,11 @@ An example of how to build an image: partitions = { "esp" = { contents = { - ... + # ... }; repartConfig = { Type = "esp"; - ... + # ... }; }; "root" = { @@ -30,7 +30,7 @@ An example of how to build an image: repartConfig = { Type = "root"; Label = "nixos"; - ... + # ... }; }; }; @@ -47,19 +47,21 @@ determined by the mount point, you have to set `stripNixStorePrefix = true;` so that the prefix is stripped from the paths before copying them into the image. ```nix -fileSystems."/nix/store".device = "/dev/disk/by-partlabel/nix-store" - -image.repart.partitions = { - "store" = { - storePaths = [ config.system.build.toplevel ]; - stripNixStorePrefix = true; - repartConfig = { - Type = "linux-generic"; - Label = "nix-store"; - ... +{ + fileSystems."/nix/store".device = "/dev/disk/by-partlabel/nix-store"; + + image.repart.partitions = { + "store" = { + storePaths = [ config.system.build.toplevel ]; + stripNixStorePrefix = true; + repartConfig = { + Type = "linux-generic"; + Label = "nix-store"; + # ... + }; }; }; -}; +} ``` ## Appliance Image {#sec-image-repart-appliance} diff --git a/nixpkgs/nixos/doc/manual/installation/changing-config.chapter.md b/nixpkgs/nixos/doc/manual/installation/changing-config.chapter.md index 9e56b15a880f..07a0074d17e7 100644 --- a/nixpkgs/nixos/doc/manual/installation/changing-config.chapter.md +++ b/nixpkgs/nixos/doc/manual/installation/changing-config.chapter.md @@ -87,7 +87,9 @@ set `mutableUsers = false`. Another way is to temporarily add the following to your configuration: ```nix -users.users.your-user.initialHashedPassword = "test"; +{ + users.users.your-user.initialHashedPassword = "test"; +} ``` *Important:* delete the \$hostname.qcow2 file if you have started the diff --git a/nixpkgs/nixos/doc/manual/installation/installing-behind-a-proxy.section.md b/nixpkgs/nixos/doc/manual/installation/installing-behind-a-proxy.section.md index aca151531d0f..691f9c9ccf6d 100644 --- a/nixpkgs/nixos/doc/manual/installation/installing-behind-a-proxy.section.md +++ b/nixpkgs/nixos/doc/manual/installation/installing-behind-a-proxy.section.md @@ -7,8 +7,10 @@ To install NixOS behind a proxy, do the following before running keep the internet accessible after reboot. ```nix - networking.proxy.default = "http://user:password@proxy:port/"; - networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + { + networking.proxy.default = "http://user:password@proxy:port/"; + networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + } ``` 1. Setup the proxy environment variables in the shell where you are diff --git a/nixpkgs/nixos/doc/manual/installation/installing-from-other-distro.section.md b/nixpkgs/nixos/doc/manual/installation/installing-from-other-distro.section.md index 921592fe5357..10ac2be4e161 100644 --- a/nixpkgs/nixos/doc/manual/installation/installing-from-other-distro.section.md +++ b/nixpkgs/nixos/doc/manual/installation/installing-from-other-distro.section.md @@ -89,12 +89,14 @@ The first steps to all these are the same: want to add something like this to your `configuration.nix`: ```nix - boot.loader.grub.extraEntries = '' - menuentry "Ubuntu" { - search --set=ubuntu --fs-uuid 3cc3e652-0c1f-4800-8451-033754f68e6e - configfile "($ubuntu)/boot/grub/grub.cfg" - } - ''; + { + boot.loader.grub.extraEntries = '' + menuentry "Ubuntu" { + search --set=ubuntu --fs-uuid 3cc3e652-0c1f-4800-8451-033754f68e6e + configfile "($ubuntu)/boot/grub/grub.cfg" + } + ''; + } ``` (You can find the appropriate UUID for your partition in @@ -164,7 +166,9 @@ The first steps to all these are the same: `sudo passwd -l root` if you use `sudo`) ```nix - users.users.root.initialHashedPassword = ""; + { + users.users.root.initialHashedPassword = ""; + } ``` 1. Build the NixOS closure and install it in the `system` profile: diff --git a/nixpkgs/nixos/doc/manual/installation/installing-virtualbox-guest.section.md b/nixpkgs/nixos/doc/manual/installation/installing-virtualbox-guest.section.md index 004838e586be..4b9ae0a9c55f 100644 --- a/nixpkgs/nixos/doc/manual/installation/installing-virtualbox-guest.section.md +++ b/nixpkgs/nixos/doc/manual/installation/installing-virtualbox-guest.section.md @@ -29,14 +29,18 @@ There are a few modifications you should make in configuration.nix. Enable booting: ```nix -boot.loader.grub.device = "/dev/sda"; +{ + boot.loader.grub.device = "/dev/sda"; +} ``` Also remove the fsck that runs at startup. It will always fail to run, stopping your boot until you press `*`. ```nix -boot.initrd.checkJournalingFS = false; +{ + boot.initrd.checkJournalingFS = false; +} ``` Shared folders can be given a name and a path in the host system in the diff --git a/nixpkgs/nixos/doc/manual/installation/upgrading.chapter.md b/nixpkgs/nixos/doc/manual/installation/upgrading.chapter.md index 79cd4e55be5c..09338bf8723d 100644 --- a/nixpkgs/nixos/doc/manual/installation/upgrading.chapter.md +++ b/nixpkgs/nixos/doc/manual/installation/upgrading.chapter.md @@ -101,8 +101,10 @@ You can keep a NixOS system up-to-date automatically by adding the following to `configuration.nix`: ```nix -system.autoUpgrade.enable = true; -system.autoUpgrade.allowReboot = true; +{ + system.autoUpgrade.enable = true; + system.autoUpgrade.allowReboot = true; +} ``` This enables a periodically executed systemd service named @@ -114,5 +116,7 @@ the new generation contains a different kernel, initrd or kernel modules. You can also specify a channel explicitly, e.g. ```nix -system.autoUpgrade.channel = "https://channels.nixos.org/nixos-23.11"; +{ + system.autoUpgrade.channel = "https://channels.nixos.org/nixos-23.11"; +} ``` |