Move disko configuration to modules

This commit is contained in:
JuliusFreudenberger 2025-08-16 22:18:20 +02:00
parent 21582cbf81
commit 59506dac35
3 changed files with 3 additions and 2 deletions

View file

@ -3,6 +3,8 @@
{
imports =
[
../../modules/disko/efi-full-btrfs.nix
../../modules/nix.nix
../../modules/network-server.nix
../../modules/locale.nix

View file

@ -1,56 +0,0 @@
{
disko.devices = {
disk = {
vdb = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
ESP = {
priority = 1;
name = "ESP";
start = "1M";
end = "128M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ]; # Override existing partition
# Subvolumes must set a mountpoint in order to be mounted,
# unless their parent is mounted
subvolumes = {
# Subvolume name is different from mountpoint
"/rootfs" = {
mountpoint = "/";
};
# Subvolume name is the same as the mountpoint
"/home" = {
mountOptions = [ "compress=zstd" ];
mountpoint = "/home";
};
# Sub(sub)volume doesn't need a mountpoint as its parent is mounted
"/home/julius" = { };
# Parent is not mounted so the mountpoint must be set
"/nix" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountpoint = "/nix";
};
};
mountpoint = "/partition-root";
};
};
};
};
};
};
};
}