This commit is contained in:
Aleksandr Lebedev 2025-08-11 14:23:54 +02:00
parent a2c4f7385b
commit 764d5dd68c
9 changed files with 4996 additions and 18 deletions

View file

@ -0,0 +1,47 @@
{
lib,
pkgs,
inputs,
namespace,
system,
target,
format,
virtual,
systems,
config,
...
}:
with lib;
with lib.${namespace}; let
cfg = config.${namespace}.presets.disko.ext4;
in {
options.${namespace}.presets.disko.ext4 = with types; {
enable = mkBoolOpt false "Enable preset";
device = mkOpt' str "/dev/nvme0n1";
mountpoint = mkOpt' path "/";
};
config = mkIf cfg.enable {
disko.devices = {
disk = {
"${cfg.device}" = {
inherit device;
type = "disk";
content = {
type = "gpt";
partitions = {
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
inherit (cfg) mountpoint;
};
};
};
};
};
};
};
};
}