about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2019-01-18 15:31:19 +0100
committerFlorian Klink <flokli@flokli.de>2019-01-18 15:33:07 +0100
commit4f11c06fac92bc19b764a9248df416f20ff5ad03 (patch)
tree04b503de11b1a8ec9fd9dc7260790677d36195ad
parent222751b029536229eb4b17cdf1f3f493124bfb7a (diff)
downloadnixlib-4f11c06fac92bc19b764a9248df416f20ff5ad03.tar
nixlib-4f11c06fac92bc19b764a9248df416f20ff5ad03.tar.gz
nixlib-4f11c06fac92bc19b764a9248df416f20ff5ad03.tar.bz2
nixlib-4f11c06fac92bc19b764a9248df416f20ff5ad03.tar.lz
nixlib-4f11c06fac92bc19b764a9248df416f20ff5ad03.tar.xz
nixlib-4f11c06fac92bc19b764a9248df416f20ff5ad03.tar.zst
nixlib-4f11c06fac92bc19b764a9248df416f20ff5ad03.zip
programs.ssh.knownHosts: update example to be an attrset
We shouldn't encourage using a list here, but prefer the attrset.
Using a list here causes very unintuitive effects during merging.
-rw-r--r--nixos/modules/programs/ssh.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/nixos/modules/programs/ssh.nix b/nixos/modules/programs/ssh.nix
index cc398174e6ce..4640c1d78d20 100644
--- a/nixos/modules/programs/ssh.nix
+++ b/nixos/modules/programs/ssh.nix
@@ -167,16 +167,16 @@ in
           The set of system-wide known SSH hosts.
         '';
         example = literalExample ''
-          [
-            {
+          {
+            myhost = {
               hostNames = [ "myhost" "myhost.mydomain.com" "10.10.1.4" ];
               publicKeyFile = ./pubkeys/myhost_ssh_host_dsa_key.pub;
-            }
-            {
+            };
+            myhost2 = {
               hostNames = [ "myhost2" ];
               publicKeyFile = ./pubkeys/myhost2_ssh_host_dsa_key.pub;
-            }
-          ]
+            };
+          }
         '';
       };