Formatting + update
This commit is contained in:
parent
93de64c64e
commit
9c895e9cc0
61 changed files with 2350 additions and 2100 deletions
|
|
@ -1,5 +1,7 @@
|
|||
{ device, swapSize ? "16G" }:
|
||||
{
|
||||
device,
|
||||
swapSize ? "16G",
|
||||
}: {
|
||||
disko.devices = {
|
||||
disk.${device} = {
|
||||
type = "disk";
|
||||
|
|
@ -7,7 +9,8 @@
|
|||
content = {
|
||||
type = "gpt"; # Initialize the disk with a GPT partition table
|
||||
partitions = {
|
||||
ESP = { # Setup the EFI System Partition
|
||||
ESP = {
|
||||
# Setup the EFI System Partition
|
||||
type = "EF00"; # Set the partition type
|
||||
size = "1000M"; # Make the partition a gig
|
||||
content = {
|
||||
|
|
@ -16,7 +19,8 @@
|
|||
mountpoint = "/boot"; # Mount it to /boot
|
||||
};
|
||||
};
|
||||
primary = { # Setup the LVM partition
|
||||
primary = {
|
||||
# Setup the LVM partition
|
||||
size = "100%"; # Fill up the rest of the drive with it
|
||||
content = {
|
||||
type = "lvm_pv"; # pvcreate
|
||||
|
|
@ -26,17 +30,22 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
lvm_vg = { # vgcreate
|
||||
vg1 = { # /dev/vg1
|
||||
lvm_vg = {
|
||||
# vgcreate
|
||||
vg1 = {
|
||||
# /dev/vg1
|
||||
type = "lvm_vg";
|
||||
lvs = { # lvcreate
|
||||
swap = { # Logical Volume = "swap", /dev/vg1/swap
|
||||
lvs = {
|
||||
# lvcreate
|
||||
swap = {
|
||||
# Logical Volume = "swap", /dev/vg1/swap
|
||||
size = swapSize;
|
||||
content = {
|
||||
type = "swap";
|
||||
};
|
||||
};
|
||||
root = { # Logical Volume = "root", /dev/vg1/root
|
||||
root = {
|
||||
# Logical Volume = "root", /dev/vg1/root
|
||||
size = "100%FREE"; # Use the remaining space in the Volume Group
|
||||
content = {
|
||||
type = "filesystem";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
{ device, mountpoint ? "/run/extraDrive" }:
|
||||
{
|
||||
device,
|
||||
mountpoint ? "/run/extraDrive",
|
||||
}: {
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"${device}" = {
|
||||
|
|
@ -7,7 +9,7 @@
|
|||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
partitions = {
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{
|
||||
device ? throw "Set this to your disk device, e.g. /dev/sda",
|
||||
...
|
||||
}: {
|
||||
{device ? throw "Set this to your disk device, e.g. /dev/sda", ...}: {
|
||||
disko.devices = {
|
||||
disk.main = {
|
||||
inherit device;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{
|
||||
device ? throw "Set this to your disk device, e.g. /dev/sda",
|
||||
...
|
||||
}:
|
||||
{
|
||||
{device ? throw "Set this to your disk device, e.g. /dev/sda", ...}: {
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
|
|
@ -41,42 +37,44 @@
|
|||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/persist";
|
||||
};
|
||||
mountpoint = "/persist";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
nodev = {
|
||||
"/" = {
|
||||
fsType = "tmpfs";
|
||||
mountOptions = [ "defaults" "size=8G" "mode=755" ];
|
||||
mountOptions = ["defaults" "size=8G" "mode=755"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems."/persist" = {
|
||||
depends = [ "/" ];
|
||||
depends = ["/"];
|
||||
neededForBoot = true;
|
||||
};
|
||||
fileSystems."/nix" = {
|
||||
device = "/persist/nix";
|
||||
options = [ "bind" ];
|
||||
depends = [ "/persist" ];
|
||||
options = ["bind"];
|
||||
depends = ["/persist"];
|
||||
neededForBoot = true;
|
||||
};
|
||||
fileSystems."/tmp" = {
|
||||
device = "/persist/tmp";
|
||||
options = [ "bind" ];
|
||||
depends = [ "/persist" ];
|
||||
options = ["bind"];
|
||||
depends = ["/persist"];
|
||||
neededForBoot = true;
|
||||
};
|
||||
swapDevices = [{
|
||||
device = "/persist/swapfile";
|
||||
size = 64*1024; # 64 GB
|
||||
}];
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/persist/swapfile";
|
||||
size = 64 * 1024; # 64 GB
|
||||
}
|
||||
];
|
||||
|
||||
boot.resumeDevice = "/persist/swapfile";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{
|
||||
device ? throw "Set this to your disk device, e.g. /dev/sda",
|
||||
...
|
||||
}: {
|
||||
{device ? throw "Set this to your disk device, e.g. /dev/sda", ...}: {
|
||||
disko.devices = {
|
||||
disk.main = {
|
||||
inherit device;
|
||||
|
|
@ -30,7 +27,7 @@
|
|||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/persist";
|
||||
mountpoint = "/persist";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -41,10 +38,10 @@
|
|||
fsType = "tmpfs";
|
||||
};
|
||||
"/nix" = {
|
||||
device = "/persist/nix";
|
||||
device = "/persist/nix";
|
||||
};
|
||||
"/tmp" = {
|
||||
device = "/persist/tmp";
|
||||
device = "/persist/tmp";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue