refactor: Format Nix file using Alejandra
This commit is contained in:
parent
92bb2976fe
commit
128cc171a5
32
test.nix
32
test.nix
@ -1,18 +1,18 @@
|
|||||||
# Realizes <num>> of derivations with size of <size>MB
|
# Realizes <num>> of derivations with size of <size>MB
|
||||||
{ size ? 1 # MB
|
{
|
||||||
, num ? 10 # count
|
size ? 1, # MB
|
||||||
, currentTime ? builtins.currentTime
|
num ? 10, # count
|
||||||
, noChroot ? false
|
currentTime ? builtins.currentTime,
|
||||||
|
noChroot ? false,
|
||||||
}:
|
}:
|
||||||
|
with import <nixpkgs> {}; let
|
||||||
with import <nixpkgs> {};
|
drv = i:
|
||||||
|
runCommand "${toString currentTime}-${toString i}" {
|
||||||
let
|
__noChroot = noChroot;
|
||||||
drv = i: runCommand "${toString currentTime}-${toString i}" {
|
} ''
|
||||||
__noChroot = noChroot;
|
dd if=/dev/zero of=$out bs=${toString size}MB count=1
|
||||||
} ''
|
'';
|
||||||
dd if=/dev/zero of=$out bs=${toString size}MB count=1
|
in
|
||||||
'';
|
writeText "empty-${toString num}-${toString size}MB" ''
|
||||||
in writeText "empty-${toString num}-${toString size}MB" ''
|
${lib.concatMapStringsSep "" drv (lib.range 1 num)}
|
||||||
${lib.concatMapStringsSep "" drv (lib.range 1 num)}
|
''
|
||||||
''
|
|
||||||
|
Loading…
Reference in New Issue
Block a user