From bc62423a8733e0629600a8dbeb72f94a694cf14f Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Sun, 23 Aug 2020 19:11:40 +0200 Subject: [PATCH] nixos/doc: convert loaOf options refs to attrsOf --- nixos/doc/manual/administration/boot-problems.xml | 4 ++-- .../manual/administration/imperative-containers.xml | 2 +- nixos/doc/manual/configuration/file-systems.xml | 8 ++++---- nixos/doc/manual/configuration/ipv4-config.xml | 2 +- nixos/doc/manual/configuration/ipv6-config.xml | 2 +- nixos/doc/manual/configuration/luks-file-systems.xml | 6 +++--- nixos/doc/manual/configuration/network-manager.xml | 2 +- nixos/doc/manual/configuration/ssh.xml | 2 +- nixos/doc/manual/configuration/user-mgmt.xml | 12 ++++++------ nixos/doc/manual/installation/changing-config.xml | 2 +- .../installation/installing-from-other-distro.xml | 2 +- nixos/doc/manual/installation/installing.xml | 2 +- nixos/doc/manual/release-notes/rl-2003.xml | 2 +- nixos/doc/manual/release-notes/rl-2009.xml | 2 -- nixos/modules/services/networking/prosody.xml | 8 ++++---- 15 files changed, 28 insertions(+), 30 deletions(-) diff --git a/nixos/doc/manual/administration/boot-problems.xml b/nixos/doc/manual/administration/boot-problems.xml index badc374ebcfd..e0f662840101 100644 --- a/nixos/doc/manual/administration/boot-problems.xml +++ b/nixos/doc/manual/administration/boot-problems.xml @@ -58,9 +58,9 @@ Like boot.debug1 or boot.debug1devices, but runs stage1 until all filesystems that are mounted during initrd are mounted (see - + ). As a motivating example, this could be useful if you've forgotten to set - + on a file system. diff --git a/nixos/doc/manual/administration/imperative-containers.xml b/nixos/doc/manual/administration/imperative-containers.xml index 7ded0c11786e..435ed230f513 100644 --- a/nixos/doc/manual/administration/imperative-containers.xml +++ b/nixos/doc/manual/administration/imperative-containers.xml @@ -27,7 +27,7 @@ # nixos-container create foo --config ' = true; - users.users.root.openssh.authorizedKeys.keys = ["ssh-dss AAAAB3N…"]; + users.users.root.openssh.authorizedKeys.keys = ["ssh-dss AAAAB3N…"]; ' By default the next free address in the 10.233.0.0/16 subnet will be chosen diff --git a/nixos/doc/manual/configuration/file-systems.xml b/nixos/doc/manual/configuration/file-systems.xml index 3ac02a975ebf..9747433375fc 100644 --- a/nixos/doc/manual/configuration/file-systems.xml +++ b/nixos/doc/manual/configuration/file-systems.xml @@ -23,12 +23,12 @@ systemd-fstab-generator. The filesystem will be mounted automatically unless "noauto" is present in options. + linkend="opt-fileSystems._name_.options">options. "noauto" filesystems can be mounted explicitly using systemctl e.g. systemctl start data.mount. Mount points are created automatically if they don’t already exist. For - , + , it’s best to use the topology-independent device aliases in /dev/disk/by-label and /dev/disk/by-uuid, as these don’t change if the @@ -36,7 +36,7 @@ You can usually omit the file system type - (), + (), since mount can usually detect the type and load the necessary kernel module automatically. However, if the file system is needed at early boot (in the initial ramdisk) and is not ext2, @@ -49,7 +49,7 @@ System startup will fail if any of the filesystems fails to mount, dropping you to the emergency shell. You can make a mount asynchronous and non-critical by adding - options = [ + options = [ "nofail" ];. diff --git a/nixos/doc/manual/configuration/ipv4-config.xml b/nixos/doc/manual/configuration/ipv4-config.xml index 71ddf41491ba..884becf0979a 100644 --- a/nixos/doc/manual/configuration/ipv4-config.xml +++ b/nixos/doc/manual/configuration/ipv4-config.xml @@ -10,7 +10,7 @@ automatically configure network interfaces. However, you can configure an interface manually as follows: -networking.interfaces.eth0.ipv4.addresses = [ { +networking.interfaces.eth0.ipv4.addresses = [ { address = "192.168.1.2"; prefixLength = 24; } ]; diff --git a/nixos/doc/manual/configuration/ipv6-config.xml b/nixos/doc/manual/configuration/ipv6-config.xml index 675a5d9a260d..7b89b4092be7 100644 --- a/nixos/doc/manual/configuration/ipv6-config.xml +++ b/nixos/doc/manual/configuration/ipv6-config.xml @@ -26,7 +26,7 @@ As with IPv4 networking interfaces are automatically configured via DHCPv6. You can configure an interface manually: -networking.interfaces.eth0.ipv6.addresses = [ { +networking.interfaces.eth0.ipv6.addresses = [ { address = "fe00:aa:bb:cc::2"; prefixLength = 64; } ]; diff --git a/nixos/doc/manual/configuration/luks-file-systems.xml b/nixos/doc/manual/configuration/luks-file-systems.xml index d3007843d68b..8a8168c095f0 100644 --- a/nixos/doc/manual/configuration/luks-file-systems.xml +++ b/nixos/doc/manual/configuration/luks-file-systems.xml @@ -30,7 +30,7 @@ Enter passphrase for /dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d: *** /, add the following to configuration.nix: -boot.initrd.luks.devices.crypted.device = "/dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d"; +boot.initrd.luks.devices.crypted.device = "/dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d"; ."/".device = "/dev/mapper/crypted"; Should grub be used as bootloader, and /boot is located @@ -60,13 +60,13 @@ Added to key to device /dev/sda2, slot: 2 To ensure that this file system is decrypted using the FIDO2 compatible key, add the following to configuration.nix: boot.initrd.luks.fido2Support = true; -boot.initrd.luks.devices."/dev/sda2".fido2.credential = "f1d00200108b9d6e849a8b388da457688e3dd653b4e53770012d8f28e5d3b269865038c346802f36f3da7278b13ad6a3bb6a1452e24ebeeaa24ba40eef559b1b287d2a2f80b7"; +boot.initrd.luks.devices."/dev/sda2".fido2.credential = "f1d00200108b9d6e849a8b388da457688e3dd653b4e53770012d8f28e5d3b269865038c346802f36f3da7278b13ad6a3bb6a1452e24ebeeaa24ba40eef559b1b287d2a2f80b7"; You can also use the FIDO2 passwordless setup, but for security reasons, you might want to enable it only when your device is PIN protected, such as Trezor. -boot.initrd.luks.devices."/dev/sda2".fido2.passwordLess = true; +boot.initrd.luks.devices."/dev/sda2".fido2.passwordLess = true; diff --git a/nixos/doc/manual/configuration/network-manager.xml b/nixos/doc/manual/configuration/network-manager.xml index 3953e0ffe851..94d229fd803f 100644 --- a/nixos/doc/manual/configuration/network-manager.xml +++ b/nixos/doc/manual/configuration/network-manager.xml @@ -19,7 +19,7 @@ All users that should have permission to change network settings must belong to the networkmanager group: -users.users.alice.extraGroups = [ "networkmanager" ]; +users.users.alice.extraGroups = [ "networkmanager" ]; diff --git a/nixos/doc/manual/configuration/ssh.xml b/nixos/doc/manual/configuration/ssh.xml index a4af1b96583d..95ad3edff935 100644 --- a/nixos/doc/manual/configuration/ssh.xml +++ b/nixos/doc/manual/configuration/ssh.xml @@ -20,7 +20,7 @@ follows: -users.users.alice.openssh.authorizedKeys.keys = +users.users.alice.openssh.authorizedKeys.keys = [ "ssh-dss AAAAB3NzaC1kc3MAAACBAPIkGWVEt4..." ]; diff --git a/nixos/doc/manual/configuration/user-mgmt.xml b/nixos/doc/manual/configuration/user-mgmt.xml index 4b1710f3a2b1..68324cc85b54 100644 --- a/nixos/doc/manual/configuration/user-mgmt.xml +++ b/nixos/doc/manual/configuration/user-mgmt.xml @@ -11,11 +11,11 @@ that a user account named alice shall exist: .alice = { - isNormalUser = true; - home = "/home/alice"; - description = "Alice Foobar"; - extraGroups = [ "wheel" "networkmanager" ]; - openssh.authorizedKeys.keys = [ "ssh-dss AAAAB3Nza... alice@foobar" ]; + isNormalUser = true; + home = "/home/alice"; + description = "Alice Foobar"; + extraGroups = [ "wheel" "networkmanager" ]; + openssh.authorizedKeys.keys = [ "ssh-dss AAAAB3Nza... alice@foobar" ]; }; Note that alice is a member of the @@ -36,7 +36,7 @@ account will cease to exist. Also, imperative commands for managing users and groups, such as useradd, are no longer available. Passwords may still be assigned by setting the user's - hashedPassword + hashedPassword option. A hashed password can be generated using mkpasswd -m sha-512 after installing the mkpasswd package. diff --git a/nixos/doc/manual/installation/changing-config.xml b/nixos/doc/manual/installation/changing-config.xml index 48193d986ab7..4288806d5eb2 100644 --- a/nixos/doc/manual/installation/changing-config.xml +++ b/nixos/doc/manual/installation/changing-config.xml @@ -78,7 +78,7 @@ mutableUsers = false. Another way is to temporarily add the following to your configuration: -users.users.your-user.initialHashedPassword = "test"; +users.users.your-user.initialHashedPassword = "test"; Important: delete the $hostname.qcow2 file if you have started the virtual machine at least once without the right users, otherwise diff --git a/nixos/doc/manual/installation/installing-from-other-distro.xml b/nixos/doc/manual/installation/installing-from-other-distro.xml index 45d68f8787f1..d2d1245c57ac 100644 --- a/nixos/doc/manual/installation/installing-from-other-distro.xml +++ b/nixos/doc/manual/installation/installing-from-other-distro.xml @@ -211,7 +211,7 @@ nixpkgs https://nixos.org/channels/nixpkgs-unstable use sudo) -users.users.root.initialHashedPassword = ""; +users.users.root.initialHashedPassword = ""; diff --git a/nixos/doc/manual/installation/installing.xml b/nixos/doc/manual/installation/installing.xml index 5f216df66f84..c7ed3b3c0c97 100644 --- a/nixos/doc/manual/installation/installing.xml +++ b/nixos/doc/manual/installation/installing.xml @@ -550,7 +550,7 @@ Retype new UNIX password: *** # Note: setting fileSystems is generally not # necessary, since nixos-generate-config figures them out # automatically in hardware-configuration.nix. - #fileSystems."/".device = "/dev/disk/by-label/nixos"; + #fileSystems."/".device = "/dev/disk/by-label/nixos"; # Enable the OpenSSH server. services.sshd.enable = true; diff --git a/nixos/doc/manual/release-notes/rl-2003.xml b/nixos/doc/manual/release-notes/rl-2003.xml index 0e9ba027a382..87f122856194 100644 --- a/nixos/doc/manual/release-notes/rl-2003.xml +++ b/nixos/doc/manual/release-notes/rl-2003.xml @@ -796,7 +796,7 @@ users.users.me = or any other display manager in NixOS as they all support auto-login. If you used this module specifically because it permitted root auto-login you can override the lightdm-autologin pam module like: -security.pam.services.lightdm-autologin.text = lib.mkForce '' +security.pam.services.lightdm-autologin.text = lib.mkForce '' auth requisite pam_nologin.so auth required pam_succeed_if.so quiet auth required pam_permit.so diff --git a/nixos/doc/manual/release-notes/rl-2009.xml b/nixos/doc/manual/release-notes/rl-2009.xml index bf96fb21a415..3d156e517c8d 100644 --- a/nixos/doc/manual/release-notes/rl-2009.xml +++ b/nixos/doc/manual/release-notes/rl-2009.xml @@ -748,8 +748,6 @@ CREATE ROLE postgres LOGIN SUPERUSER; For NixOS configuration options, the type loaOf, after its initial deprecation in release 20.03, has been removed. In NixOS and Nixpkgs options using this type have been converted to attrsOf. - - For more information on this change have look at these links: issue #1800, PR #63103. diff --git a/nixos/modules/services/networking/prosody.xml b/nixos/modules/services/networking/prosody.xml index 7859cb1578b7..e3fedf8a67e1 100644 --- a/nixos/modules/services/networking/prosody.xml +++ b/nixos/modules/services/networking/prosody.xml @@ -43,10 +43,10 @@ services.prosody = { ssl.cert = "/var/lib/acme/example.org/fullchain.pem"; ssl.key = "/var/lib/acme/example.org/key.pem"; virtualHosts."example.org" = { - enabled = true; - domain = "example.org"; - ssl.cert = "/var/lib/acme/example.org/fullchain.pem"; - ssl.key = "/var/lib/acme/example.org/key.pem"; + enabled = true; + domain = "example.org"; + ssl.cert = "/var/lib/acme/example.org/fullchain.pem"; + ssl.key = "/var/lib/acme/example.org/key.pem"; }; muc = [ { domain = "conference.example.org";