Files
nix-config/modules/nixos/disko/options.nix
mjallen18 70002a19e2 hmm
2026-04-07 18:39:42 -05:00

55 lines
1.4 KiB
Nix
Executable File

{ lib, namespace, ... }:
with lib;
let
inherit (lib.${namespace}) mkOpt mkBoolOpt;
in
{
options.${namespace}.hardware.disko = {
enable = mkEnableOption "enable disko";
filesystem = mkOption {
type = types.enum [
"bcachefs"
"btrfs"
];
default = "btrfs";
description = "Filesystem to use for the root partition";
};
enableSwap = mkBoolOpt false "Enable swap";
enableLuks = mkBoolOpt false "Enable Luks";
firmware = {
enableFirmware = mkBoolOpt false "Enable rpi firmware part";
firmwareDisk = mkOpt types.str "/dev/mmcblk0" "UEFI firmware disk";
};
swapSize = mkOpt types.str "16G" "size of swap part";
rootDisk = mkOpt types.str "/dev/nvme0n1" "Root disk";
compression = mkOpt types.str "zstd" "Type of compression to enable";
subvolumes =
mkOpt
(types.attrsOf (
types.submodule {
options = {
mountPoint = mkOpt (types.nullOr types.path) null "Mountpoint of the subvolume";
mountOptions = mkOpt (types.nullOr (types.listOf types.str)) null "Extra mount options";
};
}
))
{
"home" = { };
"etc" = { };
"nix" = { };
"root" = { };
"log" = {
mountPoint = "/var/log";
};
}
"Subvolumes on root disk";
};
}