mirror of
https://github.com/nix-community/disko.git
synced 2026-11-30 13:03:28 +01:00
types,module,tests: run shellcheck on scripts before running them in NixOS tests
This commit is contained in:
1 parent
9afae0ba36
commit
0accdf4e20
5 files changed
+38
-25
No files matched your search
+7
-12
@@ -1,5 +1,6 @@
|
||||
{ lib ? import <nixpkgs/lib>
|
||||
, rootMountPoint ? "/mnt"
|
||||
, checked ? false
|
||||
}:
|
||||
let
|
||||
types = import ./types { inherit lib rootMountPoint; };
|
||||
@@ -18,33 +19,27 @@ in
|
||||
{
|
||||
types = types;
|
||||
create = cfg: types.diskoLib.create (eval cfg).config.devices;
|
||||
createScript = cfg: pkgs: pkgs.writeScript "disko-create" ''
|
||||
#!/usr/bin/env bash
|
||||
createScript = cfg: pkgs: (types.diskoLib.writeCheckedBash { inherit pkgs checked; }) "disko-create" ''
|
||||
export PATH=${lib.makeBinPath (types.diskoLib.packages (eval cfg).config.devices pkgs)}:$PATH
|
||||
${types.diskoLib.create (eval cfg).config.devices}
|
||||
'';
|
||||
createScriptNoDeps = cfg: pkgs: pkgs.writeScript "disko-create" ''
|
||||
#!/usr/bin/env bash
|
||||
createScriptNoDeps = cfg: pkgs: (types.diskoLib.writeCheckedBash { inherit pkgs checked; noDeps = true; }) "disko-create" ''
|
||||
${types.diskoLib.create (eval cfg).config.devices}
|
||||
'';
|
||||
mount = cfg: types.diskoLib.mount (eval cfg).config.devices;
|
||||
mountScript = cfg: pkgs: pkgs.writeScript "disko-mount" ''
|
||||
#!/usr/bin/env bash
|
||||
mountScript = cfg: pkgs: (types.diskoLib.writeCheckedBash { inherit pkgs checked; }) "disko-mount" ''
|
||||
export PATH=${lib.makeBinPath (types.diskoLib.packages (eval cfg).config.devices pkgs)}:$PATH
|
||||
${types.diskoLib.mount (eval cfg).config.devices}
|
||||
'';
|
||||
mountScriptNoDeps = cfg: pkgs: pkgs.writeScript "disko-mount" ''
|
||||
#!/usr/bin/env bash
|
||||
mountScriptNoDeps = cfg: pkgs: (types.diskoLib.writeCheckedBash { inherit pkgs checked; noDeps = true; }) "disko-mount" ''
|
||||
${types.diskoLib.mount (eval cfg).config.devices}
|
||||
'';
|
||||
zapCreateMount = cfg: types.diskoLib.zapCreateMount (eval cfg).config.devices;
|
||||
zapCreateMountScript = cfg: pkgs: pkgs.writeScript "disko-zap-create-mount" ''
|
||||
#!/usr/bin/env bash
|
||||
zapCreateMountScript = cfg: pkgs: (types.diskoLib.writeCheckedBash { inherit pkgs checked; }) "disko-zap-create-mount" ''
|
||||
export PATH=${lib.makeBinPath (types.diskoLib.packages (eval cfg).config.devices pkgs)}:$PATH
|
||||
${types.diskoLib.zapCreateMount (eval cfg).config.devices}
|
||||
'';
|
||||
zapCreateMountScriptNoDeps = cfg: pkgs: pkgs.writeScript "disko-zap-create-mount" ''
|
||||
#!/usr/bin/env bash
|
||||
zapCreateMountScriptNoDeps = cfg: pkgs: (types.diskoLib.writeCheckedBash { inherit pkgs checked; noDeps = true; }) "disko-zap-create-mount" ''
|
||||
${types.diskoLib.zapCreateMount (eval cfg).config.devices}
|
||||
'';
|
||||
config = cfg: { imports = types.diskoLib.config (eval cfg).config.devices; };
|
||||
|
||||
Reference in new issue
Block a user