Skip to content

Commit d94950e

Browse files
Maurice Zhougmelikov
authored andcommitted
Update NixOS index
Co-authored-by: @SuperSandro2000 Closes openzfs#424 Signed-off-by: Maurice Zhou <[email protected]>
1 parent 4fb5fb6 commit d94950e

File tree

2 files changed

+38
-17
lines changed

2 files changed

+38
-17
lines changed

docs/Getting Started/NixOS/index.rst

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,33 +28,30 @@ Note: this is for installing ZFS on an existing
2828
NixOS installation. To use ZFS as root file system,
2929
see below.
3030

31-
Live image ships with ZFS support by default.
31+
NixOS live image ships with ZFS support by default.
3232

3333
Note that you need to apply these settings even if you don't need
3434
to boot from ZFS. The kernel module 'zfs.ko' will not be available
3535
to modprobe until you make these changes and reboot.
3636

37-
#. Import separate configration file for ZFS options::
37+
#. Edit ``/etc/nixos/configuration.nix`` and add the following
38+
options::
3839

39-
vim /etc/nixos/configuration.nix
40-
##add './zfs.nix' to 'imports'
41-
# imports = [ ./zfs.nix ];
40+
boot.supportedFilesystems = [ "zfs" ];
41+
boot.zfs.forceImportRoot = false;
42+
networking.hostId = "yourHostId";
4243

43-
#. Configure ZFS options::
44+
Where hostID can be generated with::
4445

45-
tee -a /etc/nixos/zfs.nix <<EOF
46-
{ config, pkgs, ... }:
47-
48-
{
49-
boot.supportedFilesystems = [ "zfs" ];
50-
networking.hostId = "$(head -c4 /dev/urandom | od -A none -t x4 | sed 's| ||g')";
51-
boot.zfs.forceImportRoot = false;
52-
}
53-
EOF
46+
head -c4 /dev/urandom | od -A none -t x4
5447

5548
#. Apply configuation changes::
5649

57-
nixos-rebuild switch
50+
nixos-rebuild boot
51+
52+
#. Reboot::
53+
54+
reboot
5855

5956
Root on ZFS
6057
-----------
@@ -63,3 +60,27 @@ Root on ZFS
6360
:glob:
6461

6562
*
63+
64+
Contribute
65+
----------
66+
67+
You can contribute to this documentation. Fork this repo, edit the
68+
documentation, then opening a pull request.
69+
70+
#. To test your changes locally, use the devShell in this repo::
71+
72+
git clone https://github.com/ne9z/nixos-live openzfs-docs-dev
73+
cd openzfs-docs-dev
74+
nix develop ./openzfs-docs-dev/#docs
75+
76+
#. Inside the openzfs-docs repo, build pages::
77+
78+
make html
79+
80+
#. Look for errors and warnings in the make output. If there is no
81+
errors::
82+
83+
xdg-open _build/html/index.html
84+
85+
#. ``git commit --signoff`` to a branch, ``git push``, and create a
86+
pull request. Mention @ne9z.

docs/Getting Started/RHEL-based distro/Root on ZFS.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ System Configuration
454454
grub2-pc grub2-pc-modules grub2-efi-x64-modules shim-x64 \
455455
efibootmgr kernel-core
456456
457-
.. ifconfig:: zfs_root_test
457+
.. ifconfig:: zfs_root_test
458458

459459
# skip installing firmware in test
460460
dnf -y install --allowerasing --setopt=install_weak_deps=False \

0 commit comments

Comments
 (0)