init
This commit is contained in:
50
disko.nix
Normal file
50
disko.nix
Normal file
@@ -0,0 +1,50 @@
|
||||
{ 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 = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user