mirror of
https://gitlab.com/ahoneybun/nix-configs.git
synced 2025-05-12 03:04:03 -06:00
add new example for partitions and update numbers
This commit is contained in:
parent
00c6847715
commit
c9ce3f5233
2 changed files with 50 additions and 1 deletions
|
@ -8,7 +8,7 @@
|
|||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "1024M";
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
|
|
49
partitions/simple-efi-swap.nix
Normal file
49
partitions/simple-efi-swap.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
device = "/dev/vdb";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
root = {
|
||||
end = "-8G";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
encryptedSwap = {
|
||||
size = "100M";
|
||||
content = {
|
||||
type = "swap";
|
||||
randomEncryption = true;
|
||||
priority = 100; # prefer to encrypt as long as we have space for it
|
||||
};
|
||||
};
|
||||
plainSwap = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "swap";
|
||||
discardPolicy = "both";
|
||||
resumeDevice = true; # resume from hiberation from this device
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue