refactor: Move sw into properly nested modules with unconditional import
This commit is contained in:
27
fleet/fs.nix
27
fleet/fs.nix
@@ -13,17 +13,38 @@
|
||||
device = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
description = "The main disk device to use for installation.";
|
||||
description = ''
|
||||
The main disk device to use for automated partitioning and installation.
|
||||
|
||||
When set, enables disko for declarative disk management with:
|
||||
- 1GB EFI boot partition
|
||||
- Optional swap partition (see swapSize)
|
||||
- Root partition using remaining space
|
||||
|
||||
Leave null for systems that don't need disk partitioning (containers, WSL).
|
||||
'';
|
||||
example = "/dev/nvme0n1";
|
||||
};
|
||||
useSwap = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Whether to create and use a swap partition.";
|
||||
description = ''
|
||||
Whether to create and use a swap partition.
|
||||
Disable for systems with ample RAM or SSDs where swap is undesirable.
|
||||
'';
|
||||
};
|
||||
swapSize = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
description = "The size of the swap partition.";
|
||||
description = ''
|
||||
Size of the swap partition (e.g., "16G", "32G").
|
||||
|
||||
Recommended sizes:
|
||||
- 8-16GB for desktops with 16GB+ RAM
|
||||
- 32GB for laptops (enables hibernation)
|
||||
- Match RAM size for systems <8GB RAM
|
||||
'';
|
||||
example = "32G";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user