reformat tree

This commit is contained in:
Jörg Thalheim authored and mergify[bot] committed 2023-09-17 04:43:25 +00:00
1 parent 1be23d771f
commit 9ab96378f8
9 files changed
+173 -73

No files matched your search

+4 -4
View File
@@ -24,7 +24,7 @@ let
description = "one of ${concatStringsSep "," (attrNames types)}";
check = x: if x ? type then types.${x.type}.check x else throw "No type option set in:\n${generators.toPretty {} x}";
merge = loc: foldl'
(res: def: types.${def.value.type}.merge loc [
(_res: def: types.${def.value.type}.merge loc [
# we add a dummy root parent node to render documentation
(lib.recursiveUpdate { value._module.args = extraArgs; } def)
])
@@ -183,7 +183,7 @@ let
/* Takes a Submodules config and options argument and returns a serializable
subset of config variables as a shell script snippet.
*/
defineHookVariables = { config, options }:
defineHookVariables = { options }:
let
sanitizeName = lib.replaceStrings [ "-" ] [ "_" ];
isAttrsOfSubmodule = o: o.type.name == "attrsOf" && o.type.nestedTypes.elemType.name == "submodule";
@@ -229,7 +229,7 @@ let
type = lib.types.str;
default = ''
( # ${config.type} ${concatMapStringsSep " " (n: toString (config.${n} or "")) ["name" "device" "format" "mountpoint"]} #
${diskoLib.indent (diskoLib.defineHookVariables { inherit config options; })}
${diskoLib.indent (diskoLib.defineHookVariables { inherit options; })}
${config.preCreateHook}
${diskoLib.indent attrs.default}
${config.postCreateHook}
@@ -238,7 +238,7 @@ let
description = "Creation script";
};
mkMountOption = { config, options, default }@attrs:
mkMountOption = { default, ... }@attrs:
lib.mkOption {
internal = true;
readOnly = true;
+2 -2
View File
@@ -86,7 +86,7 @@ let
tsp-config = tsp-generator.config testConfigBooted;
num-disks = builtins.length (lib.attrNames testConfigBooted.disko.devices.disk);
installed-system = { modulesPath, ... }: {
installed-system = { ... }: {
imports = [
(lib.optionalAttrs (testMode == "direct") tsp-config)
(lib.optionalAttrs (testMode == "module") {
@@ -149,7 +149,7 @@ let
makeTest' {
name = "disko-${name}";
nodes.machine = { pkgs, modulesPath, ... }: {
nodes.machine = { pkgs, ... }: {
imports = [
(lib.optionalAttrs (testMode == "module") {
imports = [
+1 -1
View File
@@ -68,7 +68,7 @@
internal = true;
readOnly = true;
type = lib.types.functionTo diskoLib.jsonType;
default = dev: { };
default = _dev: { };
description = "Metadata";
};
_create = diskoLib.mkCreateOption {