feat: aarch64 - tmpfs on root + impermanence

This commit is contained in:
Ryan Yin
2024-03-07 22:37:47 +08:00
parent 7c91ffb251
commit 5ed77b764f
8 changed files with 255 additions and 36 deletions
+19 -15
View File
@@ -1,6 +1,20 @@
{
# required by impermanence
fileSystems."/persistent".neededForBoot = true;
disko.devices = {
# TODO: rename to nvme0n1
nodev."/" = {
fsType = "tmpfs";
mountOptions = [
"size=4G"
"defaults"
# set mode to 755, otherwise systemd will set it to 777, which cause problems.
# relatime: Update inode access times relative to modify or change time.
"mode=755"
];
};
# TODO: rename to main
disk.sda = {
type = "disk";
# When using disko-install, we will overwrite this value from the commandline
@@ -57,24 +71,14 @@
type = "btrfs";
extraArgs = ["-f"];
subvolumes = {
# TODO: tmpfs on root
"@root" = {
mountpoint = "/";
mountOptions = ["compress-force=zstd:1" "noatime"];
};
"@home" = {
mountpoint = "/home";
mountOptions = ["compress-force=zstd:1"];
};
"@lib" = {
mountpoint = "/var/lib";
mountOptions = ["compress-force=zstd:1"];
};
"@nix" = {
mountpoint = "/nix";
mountOptions = ["compress-force=zstd:1" "noatime"];
};
"@persistent" = {
mountpoint = "/persistent";
mountOptions = ["compress-force=zstd:1" "noatime"];
};
"@tmp" = {
mountpoint = "/tmp";
mountOptions = ["compress-force=zstd:1" "noatime"];