Disko: Difference between revisions

Prepared the page for translation
Marked this version for translation
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>
<!--T:1-->
[https://github.com/nix-community/disko Disko] is a utility and NixOS module for declarative disk partitioning.
[https://github.com/nix-community/disko Disko] is a utility and NixOS module for declarative disk partitioning.


<!--T:2-->
[https://github.com/nix-community/disko/blob/master/docs/INDEX.md Disko Documentation Index]
[https://github.com/nix-community/disko/blob/master/docs/INDEX.md Disko Documentation Index]


== Usage ==
== Usage == <!--T:3-->


<!--T:4-->
The following example creates a new GPT partition table for the disk <code>/dev/vda</code> including two partitions for EFI boot and a [[Special:MyLanguage/bcachefs|bcachefs]] root filesystem.
The following example creates a new GPT partition table for the disk <code>/dev/vda</code> including two partitions for EFI boot and a [[Special:MyLanguage/bcachefs|bcachefs]] root filesystem.


Line 47: Line 50:
<translate>
<translate>


<!--T:5-->
The following command will apply the disk layout specified in the configuration and mount them afterwards. Warning: This will erase all data on the disk.
The following command will apply the disk layout specified in the configuration and mount them afterwards. Warning: This will erase all data on the disk.


Line 53: Line 57:
<translate>
<translate>


<!--T:6-->
<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
# sudo nix run github:nix-community/disko -- --mode disko ./disko-config.nix
# sudo nix run github:nix-community/disko -- --mode disko ./disko-config.nix
</syntaxhighlight>
</syntaxhighlight>


<!--T:7-->
Alternativley use a disk layout configuration of a [https://github.com/Lassulus/flakes-testing remote repository] containing a <code>flake.nix</code> file as an entry point.
Alternativley use a disk layout configuration of a [https://github.com/Lassulus/flakes-testing remote repository] containing a <code>flake.nix</code> file as an entry point.


<!--T:8-->
<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
# sudo nix run github:nix-community/disko -- --mode disko --flake github:Lassulus/flakes-testing#fnord
# sudo nix run github:nix-community/disko -- --mode disko --flake github:Lassulus/flakes-testing#fnord
</syntaxhighlight>
</syntaxhighlight>


<!--T:9-->
The commands above requires [[Special:MyLanguage/Flake|Flake]] features available on your system.
The commands above requires [[Special:MyLanguage/Flake|Flake]] features available on your system.


<!--T:10-->
To verify both partitions got mounted correctly, run
To verify both partitions got mounted correctly, run


<!--T:11-->
<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
# mount | grep /mnt
# mount | grep /mnt
</syntaxhighlight>
</syntaxhighlight>


== Configuration ==
== Configuration == <!--T:12-->


<!--T:13-->
In case the NixOS base system was installed on a partition layout bootstrapped with Disko, the disk config itself can be integrated into the system. First copy the file, for example <code>disko-config.nix</code> into your system configuration directory
In case the NixOS base system was installed on a partition layout bootstrapped with Disko, the disk config itself can be integrated into the system. First copy the file, for example <code>disko-config.nix</code> into your system configuration directory


<!--T:14-->
<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
# cp disko-config.nix /etc/nixos/
# cp disko-config.nix /etc/nixos/
</syntaxhighlight>
</syntaxhighlight>


<!--T:15-->
Add the Disko module on a flake-enabled system. Insert the required input and reference it and your <code>disko-config.nix</code> in the modules section. For alternative installation methods consult the Disko [https://github.com/nix-community/disko/blob/master/docs/quickstart.md quickstart guide].
Add the Disko module on a flake-enabled system. Insert the required input and reference it and your <code>disko-config.nix</code> in the modules section. For alternative installation methods consult the Disko [https://github.com/nix-community/disko/blob/master/docs/quickstart.md quickstart guide].


Line 109: Line 122:
<translate>
<translate>


<!--T:16-->
Ensure that there are no automatically generated entries of <code>fileSystems</code> options in <code>/etc/nixos/hardware-configuration.nix</code>. Disko will automatically generate them for you. Rebuild your system to apply the Disko configuration.
Ensure that there are no automatically generated entries of <code>fileSystems</code> options in <code>/etc/nixos/hardware-configuration.nix</code>. Disko will automatically generate them for you. Rebuild your system to apply the Disko configuration.


</translate>
</translate>
[[Category:Filesystem{{#translation:}}]]
[[Category:Filesystem{{#translation:}}]]