feat: Disko | configurable device name + adjusted boot partitions

This commit is contained in:
2025-02-06 16:53:05 +05:00
parent 86a567164d
commit 506df9a405

View File

@@ -1,17 +1,23 @@
{ {
device ? throw "Set this to your disk device, e.g. /dev/sda",
...
}: {
disko.devices = { disko.devices = {
disk = { disk = {
main = { main = {
inherit device;
type = "disk"; type = "disk";
device = "/dev/nvme0n1";
content = { content = {
type = "gpt"; type = "gpt";
partitions = { partitions = {
ESP = { boot = {
priority = 1; name = "boot";
size = "1M";
type = "EF02";
};
esp = {
name = "ESP"; name = "ESP";
start = "1M"; size = "500M";
end = "512M";
type = "EF00"; type = "EF00";
content = { content = {
type = "filesystem"; type = "filesystem";
@@ -38,15 +44,26 @@
subvolumes = { subvolumes = {
"/root" = { "/root" = {
mountpoint = "/"; mountpoint = "/";
mountOptions = ["subvol=root" "compress=zstd" "noatime"]; mountOptions = [
"compress=zstd"
"noatime"
];
}; };
"/nix" = { "/nix" = {
mountpoint = "/nix"; mountpoint = "/nix";
mountOptions = ["subvol=nix" "compress=zstd" "noatime"]; mountOptions = [
"subvol=nix"
"compress=zstd"
"noatime"
];
}; };
"/persistant" = { "/persistant" = {
mountpoint = "/persistant"; mountpoint = "/persistant";
mountOptions = ["subvol=persistant" "compress=zstd" "noatime"]; mountOptions = [
"subvol=persistant"
"compress=zstd"
"noatime"
];
}; };
"/swap" = { "/swap" = {
mountpoint = "/swap"; mountpoint = "/swap";