This commit is contained in:
root 2026-03-16 12:19:11 -03:00
commit 73ff9ee8ee
No known key found for this signature in database
31 changed files with 4906 additions and 0 deletions

128
storage.nix Normal file
View file

@ -0,0 +1,128 @@
{ ... }:
{
disko.devices.disk = {
data = {
type = "disk";
device = "/dev/disk/by-uuid/9878027d-209e-44f1-9030-13aa84c1fe0c";
content = {
type = "gpt";
partitions = {
root = {
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ];
mountpoint = "/data/.root-disk";
mountOptions = [
"compress=zstd"
"noatime"
];
subvolumes = {
"@vm" = {
mountpoint = "/data/vm";
mountOptions = [
"compress=zstd"
"noatime"
];
};
"@games" = {
mountpoint = "/data/games";
mountOptions = [
"compress=zstd"
"noatime"
];
};
};
};
};
};
};
};
main = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
ESP = {
size = "2G";
type = "EF00";
start = "1M";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
root = {
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ];
mountpoint = "/.root-disk";
mountOptions = [
"compress=zstd"
"noatime"
];
subvolumes = {
"@root" = {
mountpoint = "/";
mountOptions = [
"compress=zstd"
"noatime"
];
};
"@home" = {
mountpoint = "/home";
mountOptions = [
"compress=zstd"
"noatime"
];
};
"@nix" = {
mountpoint = "/nix";
mountOptions = [
"compress=zstd"
"noatime"
];
};
"@persist" = {
mountpoint = "/.persist";
mountOptions = [
"compress=zstd"
"noatime"
];
};
"@nobackup" = {
mountpoint = "/.nobackup";
mountOptions = [
"compress=zstd"
"noatime"
];
};
"@snapshots" = {
mountpoint = "/.snapshots";
mountOptions = [
"compress=zstd"
"noatime"
];
};
};
};
};
};
};
};
};
fileSystems."/.persist".neededForBoot = true;
fileSystems."/.nobackup".neededForBoot = true;
fileSystems."/home".neededForBoot = true;
swapDevices = [
{
device = "/.nobackup/swapfile";
size = 64 * 1024;
}
];
}