mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-12 08:00:05 +01:00
run nix fmt
This commit is contained in:
parent
834b7b2a33
commit
af27d7917d
5 changed files with 46 additions and 30 deletions
|
|
@ -44,9 +44,11 @@
|
|||
readOnly = true;
|
||||
type = diskoLib.jsonType;
|
||||
default =
|
||||
diskoLib.deepMergeMap (lv:
|
||||
lib.optionalAttrs (lv.content != null) (lv.content._meta [ "lvm_vg" config.name ])
|
||||
) (lib.attrValues config.lvs);
|
||||
diskoLib.deepMergeMap
|
||||
(lv:
|
||||
lib.optionalAttrs (lv.content != null) (lv.content._meta [ "lvm_vg" config.name ])
|
||||
)
|
||||
(lib.attrValues config.lvs);
|
||||
description = "Metadata";
|
||||
};
|
||||
_create = diskoLib.mkCreateOption {
|
||||
|
|
@ -71,9 +73,11 @@
|
|||
inherit config options;
|
||||
default = _:
|
||||
let
|
||||
lvMounts = diskoLib.deepMergeMap (lv:
|
||||
lib.optionalAttrs (lv.content != null) (lv.content._mount { dev = "/dev/${config.name}/${lv.name}"; })
|
||||
) (lib.attrValues config.lvs);
|
||||
lvMounts = diskoLib.deepMergeMap
|
||||
(lv:
|
||||
lib.optionalAttrs (lv.content != null) (lv.content._mount { dev = "/dev/${config.name}/${lv.name}"; })
|
||||
)
|
||||
(lib.attrValues config.lvs);
|
||||
in
|
||||
{
|
||||
dev = ''
|
||||
|
|
@ -87,21 +91,25 @@
|
|||
internal = true;
|
||||
readOnly = true;
|
||||
default =
|
||||
map (lv: [
|
||||
(lib.optional (lv.content != null) (lv.content._config "/dev/${config.name}/${lv.name}"))
|
||||
(lib.optional (lv.lvm_type != null) {
|
||||
boot.initrd.kernelModules = [ "dm-${lv.lvm_type}" ];
|
||||
})
|
||||
]) (lib.attrValues config.lvs);
|
||||
map
|
||||
(lv: [
|
||||
(lib.optional (lv.content != null) (lv.content._config "/dev/${config.name}/${lv.name}"))
|
||||
(lib.optional (lv.lvm_type != null) {
|
||||
boot.initrd.kernelModules = [ "dm-${lv.lvm_type}" ];
|
||||
})
|
||||
])
|
||||
(lib.attrValues config.lvs);
|
||||
description = "NixOS configuration";
|
||||
};
|
||||
_pkgs = lib.mkOption {
|
||||
internal = true;
|
||||
readOnly = true;
|
||||
type = lib.types.functionTo (lib.types.listOf lib.types.package);
|
||||
default = pkgs: lib.flatten (map (lv:
|
||||
lib.optional (lv.content != null) (lv.content._pkgs pkgs)
|
||||
) (lib.attrValues config.lvs));
|
||||
default = pkgs: lib.flatten (map
|
||||
(lv:
|
||||
lib.optional (lv.content != null) (lv.content._pkgs pkgs)
|
||||
)
|
||||
(lib.attrValues config.lvs));
|
||||
description = "Packages";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue