mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-25 15:51:54 -05:00
rustboro: switch to btrfs and systemd-boot
This commit is contained in:
parent
d6fa8fc2bd
commit
df4410ae77
|
@ -9,11 +9,10 @@
|
||||||
./disko.nix
|
./disko.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Bootloader.
|
boot = {
|
||||||
boot.loader.grub = {
|
# Bootloader.
|
||||||
enable = true;
|
loader.systemd-boot.enable = true;
|
||||||
efiSupport = true;
|
loader.efi.canTouchEfiVariables = true;
|
||||||
efiInstallAsRemovable = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.hostName = "rustboro"; # Define your hostname.
|
networking.hostName = "rustboro"; # Define your hostname.
|
||||||
|
|
|
@ -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";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue