Update NixOS index
Co-authored-by: @SuperSandro2000 Closes #424 Signed-off-by: Maurice Zhou <yuchen@apvc.uk>
This commit is contained in:
committed by
George Melikov
parent
4fb5fb694f
commit
d94950e80d
@@ -28,33 +28,30 @@ Note: this is for installing ZFS on an existing
|
|||||||
NixOS installation. To use ZFS as root file system,
|
NixOS installation. To use ZFS as root file system,
|
||||||
see below.
|
see below.
|
||||||
|
|
||||||
Live image ships with ZFS support by default.
|
NixOS live image ships with ZFS support by default.
|
||||||
|
|
||||||
Note that you need to apply these settings even if you don't need
|
Note that you need to apply these settings even if you don't need
|
||||||
to boot from ZFS. The kernel module 'zfs.ko' will not be available
|
to boot from ZFS. The kernel module 'zfs.ko' will not be available
|
||||||
to modprobe until you make these changes and reboot.
|
to modprobe until you make these changes and reboot.
|
||||||
|
|
||||||
#. Import separate configration file for ZFS options::
|
#. Edit ``/etc/nixos/configuration.nix`` and add the following
|
||||||
|
options::
|
||||||
|
|
||||||
vim /etc/nixos/configuration.nix
|
boot.supportedFilesystems = [ "zfs" ];
|
||||||
##add './zfs.nix' to 'imports'
|
boot.zfs.forceImportRoot = false;
|
||||||
# imports = [ ./zfs.nix ];
|
networking.hostId = "yourHostId";
|
||||||
|
|
||||||
#. Configure ZFS options::
|
Where hostID can be generated with::
|
||||||
|
|
||||||
tee -a /etc/nixos/zfs.nix <<EOF
|
head -c4 /dev/urandom | od -A none -t x4
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
boot.supportedFilesystems = [ "zfs" ];
|
|
||||||
networking.hostId = "$(head -c4 /dev/urandom | od -A none -t x4 | sed 's| ||g')";
|
|
||||||
boot.zfs.forceImportRoot = false;
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
#. Apply configuation changes::
|
#. Apply configuation changes::
|
||||||
|
|
||||||
nixos-rebuild switch
|
nixos-rebuild boot
|
||||||
|
|
||||||
|
#. Reboot::
|
||||||
|
|
||||||
|
reboot
|
||||||
|
|
||||||
Root on ZFS
|
Root on ZFS
|
||||||
-----------
|
-----------
|
||||||
@@ -63,3 +60,27 @@ Root on ZFS
|
|||||||
:glob:
|
:glob:
|
||||||
|
|
||||||
*
|
*
|
||||||
|
|
||||||
|
Contribute
|
||||||
|
----------
|
||||||
|
|
||||||
|
You can contribute to this documentation. Fork this repo, edit the
|
||||||
|
documentation, then opening a pull request.
|
||||||
|
|
||||||
|
#. To test your changes locally, use the devShell in this repo::
|
||||||
|
|
||||||
|
git clone https://github.com/ne9z/nixos-live openzfs-docs-dev
|
||||||
|
cd openzfs-docs-dev
|
||||||
|
nix develop ./openzfs-docs-dev/#docs
|
||||||
|
|
||||||
|
#. Inside the openzfs-docs repo, build pages::
|
||||||
|
|
||||||
|
make html
|
||||||
|
|
||||||
|
#. Look for errors and warnings in the make output. If there is no
|
||||||
|
errors::
|
||||||
|
|
||||||
|
xdg-open _build/html/index.html
|
||||||
|
|
||||||
|
#. ``git commit --signoff`` to a branch, ``git push``, and create a
|
||||||
|
pull request. Mention @ne9z.
|
||||||
|
|||||||
@@ -454,7 +454,7 @@ System Configuration
|
|||||||
grub2-pc grub2-pc-modules grub2-efi-x64-modules shim-x64 \
|
grub2-pc grub2-pc-modules grub2-efi-x64-modules shim-x64 \
|
||||||
efibootmgr kernel-core
|
efibootmgr kernel-core
|
||||||
|
|
||||||
.. ifconfig:: zfs_root_test
|
.. ifconfig:: zfs_root_test
|
||||||
|
|
||||||
# skip installing firmware in test
|
# skip installing firmware in test
|
||||||
dnf -y install --allowerasing --setopt=install_weak_deps=False \
|
dnf -y install --allowerasing --setopt=install_weak_deps=False \
|
||||||
|
|||||||
Reference in New Issue
Block a user