mods.drives.defaultDrives.enable
Use default drive config.
-
Manual variant This config expects 4 different partitions on a single drive:
- boot partition with BOOT label and vfat format (filesystem configurable)
- swap partition with SWAP label
- root partition with ROOT label and ext4 format (filesystem configurable)
- home partition with HOME label and ext4 format (filesystem configurable)
- gpt disk format
NOTE: Any different configuration must be done manually with this turned off.
-
Disko variant This config creates 4 different partitions on a single drive:
- boot partition with 1GB size and vfat format
- swap partition with 32GB (size configurable)
- root partition with 30% size and ext4 format (size and filesystem configurable)
- home partition with 70%~ size and ext4 format (size and filesystem configurable)
- gpt disk format
NOTE: Any different configuration must be done manually with this turned off.
Type: boolean
Default:
true
Example:
false
mods.drives.disko.defaultDiskId
The name, ID, UUID or similar for the default drive.
Type: string
Default:
"TODO"
Example:
"/dev/nvme0n1"
mods.drives.disko.rootAmount
The percentage of the disk for root. (Home will take up the rest) (Only for disko)
Type: signed integer or floating point number
Default:
30
Example:
40
mods.drives.disko.swapAmount
The amount of swap to use. (Only for disko)
Type: signed integer or floating point number
Default:
32
Example:
64
mods.drives.extraDrives
Extra drives to add. Please ensure to add variant compliant attrsets (manual/disko). (The example is for manual variant, here an example for disko):
drive2 = (lib.optionalAttrs config.mods.drives.defaultDrives.enable) {
device = "/dev/nvme1n1"
type = "disk";
content = {
type = "gpt";
partitions = {
drive2 = {
start = "0%";
end = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/drive2";
mountOptions = [
"noatime"
"nodiratime"
"discard"
];
};
};
};
};
};
Type: list of attribute set of anything
Default:
[ ]
Example:
[
{
drive = {
device = "/dev/disk/by-label/DRIVE2";
fsType = "ext4";
options = [
"noatime"
"nodiratime"
"discard"
];
};
name = "drive2";
}
]
mods.drives.homeAndRootFsTypes
Filesystem for the home and root partitions.
Type: one of “btrfs”, “ext2”, “ext3”, “ext4”, “exfat”, “f2fs”, “fat8”, “fat16”, “fat32”, “ntfs”, “xfs”, “zfs”
Default:
"ext4"
Example:
"btrfs"
mods.drives.useEncryption
Enables encryption. !WARNING! You need your root drive to be named root exactly! Otherwise there will not be a root crypt! !WARNING!
Type: boolean
Default:
false
Example:
true
mods.drives.useSwap
Use swap in drive.
Type: boolean
Default:
true
Example:
false
mods.drives.variant
Disk configuration type, either “manual” for regular NixOS disk configuration, or “disko” for using disko to automatically format your drives.
Type: one of “manual”, “disko”
Default:
"manual"
Example:
"disko"