mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-11 23:50:05 +01:00
style: Apply nixpkgs-fmt and fix
Apply standard formatting and some statix conventions using; ```sh nixpkgs-fmt **.nix && statix fix . ``` With the intent of making contribution a bit easier and reducing mental load in hand formatting (in the same vein as [black]). [black]: https://github.com/psf/black#the-uncompromising-code-formatter
This commit is contained in:
parent
b1a4ecb8ca
commit
08435eec4b
23 changed files with 171 additions and 158 deletions
|
|
@ -2,14 +2,15 @@
|
|||
let
|
||||
types = import ./types {
|
||||
inherit lib;
|
||||
rootMountPoint = config.disko.rootMountPoint;
|
||||
inherit (config.disko) rootMountPoint;
|
||||
};
|
||||
cfg = config.disko;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.disko = {
|
||||
devices = lib.mkOption {
|
||||
type = types.devices;
|
||||
default = {};
|
||||
default = { };
|
||||
description = "The devices to set up";
|
||||
};
|
||||
rootMountPoint = lib.mkOption {
|
||||
|
|
@ -27,7 +28,7 @@ in {
|
|||
default = true;
|
||||
};
|
||||
};
|
||||
config = lib.mkIf (cfg.devices.disk != {}) {
|
||||
config = lib.mkIf (cfg.devices.disk != { }) {
|
||||
system.build.formatScript = pkgs.writers.writeBash "disko-create" ''
|
||||
export PATH=${lib.makeBinPath (types.diskoLib.packages cfg.devices pkgs)}:$PATH
|
||||
${types.diskoLib.create cfg.devices}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue