started work on a new live environment nix config using impermanence

This commit is contained in:
2024-11-17 21:42:06 -05:00
parent 7a60cdd513
commit 6350837b37
7 changed files with 127 additions and 240 deletions

View File

@@ -0,0 +1,56 @@
# USAGE in your configuration.nix.
# Update devices to match your hardware.
{ device ? throw "Set this to your disk device, e.g. /dev/sda", root_size
, nix_size, ... }: {
disko.devices = {
disk = {
main = {
inherit device;
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
};
ESP = {
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
nix = {
size = "${nix_size}";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/nix";
};
};
root = {
size = "${root_size}";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
home = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/home";
};
};
};
};
};
};
};
}