rustboro: switch to btrfs and systemd-boot

This commit is contained in:
Aly Raffauf 2024-04-02 00:28:55 -04:00
parent d6fa8fc2bd
commit df4410ae77
2 changed files with 34 additions and 14 deletions

View file

@ -9,11 +9,10 @@
./disko.nix ./disko.nix
]; ];
boot = {
# Bootloader. # Bootloader.
boot.loader.grub = { loader.systemd-boot.enable = true;
enable = true; loader.efi.canTouchEfiVariables = true;
efiSupport = true;
efiInstallAsRemovable = true;
}; };
networking.hostName = "rustboro"; # Define your hostname. networking.hostName = "rustboro"; # Define your hostname.

View file

@ -1,18 +1,17 @@
{ {
disko.devices = { disko.devices = {
disk = { disk = {
main = { vdb = {
type = "disk"; type = "disk";
device = "/dev/sda"; device = "/dev/sda";
content = { content = {
type = "gpt"; type = "gpt";
partitions = { partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
};
ESP = { ESP = {
size = "512M"; priority = 1;
name = "ESP";
start = "1M";
end = "128M";
type = "EF00"; type = "EF00";
content = { content = {
type = "filesystem"; type = "filesystem";
@ -23,9 +22,31 @@
root = { root = {
size = "100%"; size = "100%";
content = { content = {
type = "filesystem"; type = "btrfs";
format = "ext4"; extraArgs = [ "-f" ]; # Override existing partition
mountpoint = "/"; # Subvolumes must set a mountpoint in order to be mounted,
# unless their parent is mounted
subvolumes = {
# Subvolume name is different from mountpoint
"rootfs" = { mountpoint = "/"; };
# For use with future impermanence setups
"persistent" = {
mountpoint = "/persistent";
mountOptions = [ "compress=zstd" ];
};
# Subvolume name is the same as the mountpoint
"home" = {
mountOptions = [ "compress=zstd" ];
mountpoint = "/home";
};
# Parent is not mounted so the mountpoint must be set
"nix" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountpoint = "/nix";
};
};
mountpoint = "/partition-root";
}; };
}; };
}; };