Disko: Difference between revisions
update disko config to one from this decade |
Prepared the page for translation |
||
| Line 1: | Line 1: | ||
<languages/> | |||
<translate> | |||
[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. | ||
| Line 5: | Line 7: | ||
== Usage == | == Usage == | ||
The following example creates a new GPT partition table for the disk <code>/dev/vda</code> including two partitions for EFI boot and a [[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. | ||
</translate> | |||
{{file|disko-config.nix|nix|<nowiki> | {{file|disko-config.nix|nix|<nowiki> | ||
{ | { | ||
| Line 42: | Line 45: | ||
} | } | ||
</nowiki>}} | </nowiki>}} | ||
<translate> | |||
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. | ||
</translate> | |||
{{Warning|The disko commands will erase all existing data on your disk and repartition it according to the given configuration.}} | {{Warning|The disko commands will erase all existing data on your disk and repartition it according to the given configuration.}} | ||
<translate> | |||
<syntaxhighlight lang="console"> | <syntaxhighlight lang="console"> | ||
| Line 57: | Line 63: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
The commands above requires [[Flake]] features available on your system. | The commands above requires [[Special:MyLanguage/Flake|Flake]] features available on your system. | ||
To verify both partitions got mounted correctly, run | To verify both partitions got mounted correctly, run | ||
| Line 75: | Line 81: | ||
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]. | ||
</translate> | |||
{{file|/etc/nixos/flake.nix|nix|<nowiki> | {{file|/etc/nixos/flake.nix|nix|<nowiki> | ||
{ | { | ||
| Line 100: | Line 107: | ||
} | } | ||
</nowiki>}} | </nowiki>}} | ||
<translate> | |||
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. | ||
[[Category:Filesystem]] | </translate> | ||
[[Category:Filesystem{{#translation:}}]] | |||