This repository has been archived on 2025-11-02. You can view files and clone it, but cannot push or open issues or pull requests.
Files
nix-thinkcentre/disko.nix
2025-10-11 19:10:48 +05:00

51 lines
1.4 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ inputs, ... }: {
# Импортирование flake модуля.
imports = [ inputs.disko.nixosModules.disko ];
# Функция disko.
disko.devices = {
disk = {
# Основные настройки.
# тип девайса и разделы.
default = {
device = "/dev/sda"; # Тип девайса, может быть /dev/nvme0p1...
type = "disk";
content = {
type = "gpt";
# Разделы дисков.
partitions = {
# Загрузочный раздел
ESP = {
type = "EF00";
size = "1G"; # размер раздела
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
# Подкачка
# (на случай если 32 гб заполнятся ;>)
swap = {
size = "10G";
content = {
type = "swap";
};
};
# Системный раздел
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
}