mkDeploy
This commit is contained in:
parent
a2c4f7385b
commit
764d5dd68c
9 changed files with 4996 additions and 18 deletions
47
modules/nixos/presets/disko/ext4/default.nix
Normal file
47
modules/nixos/presets/disko/ext4/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue