diff --git a/hosts/rustboro/default.nix b/hosts/rustboro/default.nix index 0d37b2b4..828bdda0 100644 --- a/hosts/rustboro/default.nix +++ b/hosts/rustboro/default.nix @@ -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. diff --git a/hosts/rustboro/disko.nix b/hosts/rustboro/disko.nix index 2efc3db2..e08fbac9 100644 --- a/hosts/rustboro/disko.nix +++ b/hosts/rustboro/disko.nix @@ -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"; }; }; };