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
];
# Bootloader.
boot.loader.grub = {
enable = true;
efiSupport = true;
efiInstallAsRemovable = true;
boot = {
# Bootloader.
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
};
networking.hostName = "rustboro"; # Define your hostname.

View file

@ -1,18 +1,17 @@
{
disko.devices = {
disk = {
main = {
vdb = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
};
ESP = {
size = "512M";
priority = 1;
name = "ESP";
start = "1M";
end = "128M";
type = "EF00";
content = {
type = "filesystem";
@ -23,9 +22,31 @@
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
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 = "/"; };
# 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";
};
};
};